View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003936 | JEDI VCL | 00 JVCL Components | public | 2006-10-02 04:15 | 2006-11-01 06:45 |
| Reporter | ricolebo | Assigned To | obones | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | Daily / GIT | ||||
| Target Version | Fixed in Version | 3.30 | |||
| Summary | 0003936: JvSpinEdit don't work with displayFormat | ||||
| Description | In the code of jvSpin.pas I saw that editFormat is changed when displayFormat is used. When the spinEdit is in edit mode the edit format become '0.#' and display 0 and so it's impossible to input decimalSeparator. in TJvCustomSpinEdit.DataChanged the correct editFormat is '0.0' So if someboby could make this change : MakeStr('#', FDecimal) by MakeStr('0', FDecimal) procedure TJvCustomSpinEdit.DataChanged; var EditFormat: string; WasModified: Boolean; begin if (ValueType = vtFloat) and FFocused and (FDisplayFormat <> '') then begin EditFormat := '0'; if FDecimal > 0 then EditFormat := EditFormat + '.' + MakeStr('0', FDecimal); // Line t o change { Changing EditText sets Modified to false } WasModified := Modified; try Text := FormatFloat(EditFormat, Value); finally Modified := WasModified; end; end; end; Thank you Eric | ||||
| Tags | No tags attached. | ||||
|
|
To see the bug, set the the jvSpinEdit like this : Decimal = 2 DisplayFormat = #,##0.00 € ValueType = vtFloat |
|
|
Why is '0' better than '#' in this case? |
|
|
Hi olivier, '0' is better than '#' in this case, because the spinEdit use the displayFormat as an editFormat (It's not logical, but it is like that !) So when then displayFormat is 0.# the editFormat is 0 and then it's not possible to input float value. Hope it can help you to understand the problem |
|
2006-10-09 03:34
|
testSpin.zip (3,931 bytes) |
|
|
This is now fixed in SVN. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2006-10-02 04:15 | ricolebo | New Issue | |
| 2006-10-02 04:25 | ricolebo | Note Added: 0010273 | |
| 2006-10-06 03:52 | obones | Note Added: 0010311 | |
| 2006-10-06 03:52 | obones | Status | new => feedback |
| 2006-10-06 04:32 | ricolebo | Note Added: 0010316 | |
| 2006-10-09 03:34 | ricolebo | File Added: testSpin.zip | |
| 2006-11-01 06:45 | obones | Status | feedback => resolved |
| 2006-11-01 06:45 | obones | Fixed in Version | => Daily / SVN |
| 2006-11-01 06:45 | obones | Resolution | open => fixed |
| 2006-11-01 06:45 | obones | Assigned To | => obones |
| 2006-11-01 06:45 | obones | Note Added: 0010401 |