Lazarus
Announcements => Third party => Topic started by: wOvAN on January 08, 2010, 02:06:54 pm
-
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. :)
-
Hello,
I installed & tried the data bound TDateEdit & got exception errors due to this line in the code of the wdbdateedit.pas file
FDataLink.Field.AsDateTime := Date;
-
Hello,
I installed & tried the data bound TDateEdit & got exception errors due to this line in the code of the wdbdateedit.pas file
FDataLink.Field.AsDateTime := Date;
I guess the assigned field wasn't a datetime format? this could ba the only reasonable reason that caused convertion error.
-
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
{-----------------------------------------------------------------------------------
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;
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?