View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003149 | JEDI VCL | 00 JVCL Components | public | 2005-08-11 01:24 | 2005-10-02 06:56 |
Reporter | elahn | Assigned To | obones | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0003149: TJvValidateEdit -> AllowEmpty property added | ||||
Description | The existing behaviour if an "empty" state is desired, is to set the ZeroEmpty property, which displays '' when the Value = 0. This doesn't allow for a distinction in state between "empty" and "value of 0 has been entered". An AllowEmpty property allows Text/EditText = '', while the Value/AsInteger/AsCurrency properties return a value of 0 exactly as they would if the ZeroEmpty property were set. | ||||
Additional Information | Implementation: In TJvCustomValidateEdit, protected: property AllowEmpty: Boolean read FAllowEmpty write FAllowEmpty; At the start of TJvCustomValidateEdit.DisplayText if FAllowEmpty and (FEditText = '') then ChangeText('') else Modified Property: TJvCustomValidateEdit.Value I've added the " stored False" specifier for the Value property because Text & EditText are both being stored and storing Value as well only serves to cause validation to occur twice when loading the control. Also, when Value is stored, AllowEmpty is set and Text = '' at design time, when the program is run Value is loaded and Text is set to '0'. In TJvValidateEdit, published: property AllowEmpty default False; Side Note: I would much prefer to have AllowEmpty default True, but it is possible for that to break existing behaviour. :( If everyone is happy with default True and a release note on the next JVCL release telling people to be aware of it, then that'd be great! Otherwise, I'll deal with changing the AllowEmpty property each time I drop a new one on a form. | ||||
Tags | No tags attached. | ||||
2005-08-11 01:24
|
JvValidateEdit.pas (35,491 bytes) |
2005-09-15 22:49
|
JvValidateEdit.pas_To_Replace_CVS_v1.37.zip (7,203 bytes) |
|
Changes integrated into latest version from CVS, JvValidateEdit.pas (v1.37). |
2005-09-28 20:57
|
JvValidateEdit.pas_To_Replace_CVS_v1.37_(no_comments).zip (7,154 bytes) |
|
This is now in CVS. Please, next time, ensure that the line endings are DOS type (0000013#10) instead of UNIX type. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-08-11 01:24 | elahn | New Issue | |
2005-08-11 01:24 | elahn | File Added: JvValidateEdit.pas | |
2005-09-15 22:49 | elahn | File Added: JvValidateEdit.pas_To_Replace_CVS_v1.37.zip | |
2005-09-15 22:50 | elahn | Note Added: 0007935 | |
2005-09-28 20:57 | elahn | File Added: JvValidateEdit.pas_To_Replace_CVS_v1.37_(no_comments).zip | |
2005-10-02 06:56 | obones | Status | new => resolved |
2005-10-02 06:56 | obones | Resolution | open => fixed |
2005-10-02 06:56 | obones | Assigned To | => obones |
2005-10-02 06:56 | obones | Note Added: 0007995 |