View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004572 | JEDI VCL | 00 JVCL Components | public | 2008-11-07 07:39 | 2008-12-10 13:44 |
Reporter | deadcantdance | Assigned To | AHUser | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.34 | ||||
Target Version | Fixed in Version | 3.36 | |||
Summary | 0004572: JvSpinEdit: Cannot enter negative value directly if actual value is 0 | ||||
Description | When a JvSpinEdit has an actual value 0, you can't enter a value like -5 directly. You have to enter 5, after that you can enter the minus-sign. | ||||
Tags | No tags attached. | ||||
|
Please provide the zipped sources of a sample application showing this. |
2008-11-07 09:37
|
JvSpinEdit.zip (6,463 bytes) |
|
Sample is attached now. |
2008-12-10 11:45
|
JvSpin_Mantis4572.patch (999 bytes)
Index: JvSpin.pas =================================================================== --- JvSpin.pas (revision 12069) +++ JvSpin.pas (working copy) @@ -169,6 +169,7 @@ // FButtonKind: TSpinButtonKind; FUpDown: TCustomUpDown; FThousands: Boolean; // New + FIsNegative: Boolean; function StoreCheckMaxValue: Boolean; function StoreCheckMinValue: Boolean; procedure SetCheckMaxValue(NewValue: Boolean); @@ -684,6 +685,8 @@ OldSelStart := SelStart; try OldText := inherited Text; + if (length(OldText)>0) then + IsNegative := Text[1] = '-'; try if not (csDesigning in ComponentState) and (coCheckOnChange in CheckOptions) then begin @@ -1845,6 +1848,8 @@ //Text := IntToStr(Round(CheckValue(NewValue))); Text := FloatToStrF(CheckValue(NewValue), FloatFormat, 15, 0); end; + if (FIsNegative and (Text[1] <> '-')) then + Text := '-' + Text; DataChanged; finally Modified := WasModified; |
|
I've added a patch, check it, if you like it put it into trunk :) |
|
Fixed in SVN. Thanks for the patch. |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-11-07 07:39 | deadcantdance | New Issue | |
2008-11-07 08:08 | obones | Note Added: 0014982 | |
2008-11-07 08:08 | obones | Status | new => feedback |
2008-11-07 09:37 | deadcantdance | File Added: JvSpinEdit.zip | |
2008-11-07 09:37 | deadcantdance | Note Added: 0014984 | |
2008-12-10 11:46 | deadcantdance | File Added: JvSpin_Mantis4572.patch | |
2008-12-10 11:46 | deadcantdance | Note Added: 0015088 | |
2008-12-10 13:44 | AHUser | Note Added: 0015091 | |
2008-12-10 13:44 | AHUser | Status | feedback => resolved |
2008-12-10 13:44 | AHUser | Fixed in Version | => Daily / SVN |
2008-12-10 13:44 | AHUser | Resolution | open => fixed |
2008-12-10 13:44 | AHUser | Assigned To | => AHUser |