Forum > Third party
WLibrary
(1/1)
wOvAN:
Hello. Let me share with you a small set of components. Hoping it'll be extended in future.
For now it includes:
* TWPanel - simple panel with OnPaint event.
and a couple data aware components
* TWDBFilterDialog - Filter dialog for a given datasource.
* TWDBDateEdit.
Any ideas and coding are welcomed. :)
JD:
Hello,
I installed & tried the data bound TDateEdit & got exception errors due to this line in the code of the wdbdateedit.pas file
--- Code: --- FDataLink.Field.AsDateTime := Date;
--- End code ---
wOvAN:
--- Quote from: JD on January 11, 2010, 08:51:55 am ---Hello,
I installed & tried the data bound TDateEdit & got exception errors due to this line in the code of the wdbdateedit.pas file
--- Code: --- FDataLink.Field.AsDateTime := Date;
--- End code ---
--- End quote ---
I guess the assigned field wasn't a datetime format? this could ba the only reasonable reason that caused convertion error.
JD:
Thanks a lot. That was the cause of problem.
I noticed that your databound date component allows edit masks. That will be very useful for me.
I also noticed that the date component does not automatically put the table in the edit state when I make changes to the date.
So I had to add the following code snippet to the component's OnKeyDown method
--- Code: ---
{-----------------------------------------------------------------------------------
wdbedDateVisite OnKeyDown
Procedure to put the table into edit mode once the user presses a key while in the
date field. The component does not do this automatically so I had to add this code.
------------------------------------------------------------------------------------}
procedure TfrmCarnetdeBord.wdbedDateVisiteKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
// Put the table into edit mode if this is not already the case
//
if dmGestionnaire.ztblCarnet.State in [dsBrowse] then
dmGestionnaire.ztblCarnet.Edit;
end;
--- End code ---
Will you include this modification in future releases? In addition, will you add a means of validating the date entered into the field by the user or should I used the ValidateEdit procedure of the component?
Navigation
[0] Message Index