I Add some code at TDateEdit
? TDateEdit = class(TCustomEditButton)
? private
??? FDefaultToday: Boolean;
??? FDialogTitle: TCaption;
??? FDisplaySettings: TDisplaySettings;
??? FOnAcceptDate: TAcceptDateEvent;
??? FOnCustomDate: TCustomDateEvent;
??? FOKCaption: TCaption;
??? FCancelCaption: TCaption;
??? FDateFormat: string;
??? function GetDate: TDateTime;
??? function IsStoreTitle: boolean;
??? procedure SetDate(Value: TDateTime);
??? procedure CalendarPopupReturnDate(Sender: TObject; const ADate: TDateTime);
? protected
??? function GetDefaultGlyph: TBitmap; override;
??? function GetDefaultGlyphName: String; override;
??? procedure DoButtonClick(Sender: TObject); override;
??? procedure DblClick; override;
??? procedure DoExit; override; <- This
procedure TDateEdit.DoExit;
var
?? _date:TDateTime;
begin
? if Text'' then
??? if TryStrToDate(Text,_date) then
??? begin
????? text:=DateToStr(_date);
????? exit;
??? end;
? Text:=DateToStr(now);
? inherited DoExit;
end;The main purpose is to make more easy
? When you type only "21" at this DateEdit then you tab it's you have complete date
=============INTOSOFT============
ALEXIO CHAOS
Yahoo Messager
=================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20090112/1b0e8c0f/attachment.html
