naxsourcing.blogg.se

Delphi caret position tedit
Delphi caret position tedit










delphi caret position tedit

- procedure TDateEdit.ReformatText īegin if (FLastValidDate = 0) then begin if (Owner is TCustomForm) and (TCustomForm(Owner).ActiveControl = self) then inherited text := FBlankDate else inherited text := '' Ĭase FDateFormat of 'd': inherited Text :=įormat( '%2.2d%s%2.2d%1:s%3:4.4d',) įormat( '%4.4d%s%2.2d%1:s%3:2.2d',) if not (csLoading in ComponentState) and FUseOSDateFormat then exit - procedure TDateEdit.SetDateFormat( const value: string) īegin //if UseOSDateFormat = true then don't allow resetting of fDateFormat. - function TDateEdit.GetDateFormat: string - procedure TDateEdit.Clear īegin //simply restore the last valid date - function strToWord( const str: string startPos, len: integer): word īegin if (length(str) = 1) and (Year = 1) and (Month = 1) and (Day 2100) then exit Read FDoInvalidDate write FDoInvalidDate

delphi caret position tedit

Read FDoCheckDate write FDoCheckDate //see history 310503 //OnInvalidDate: optional event to customize invalid date notification property OnInvalidDate: TNotifyEvent OnCheckDate: optional event to facilitate restricting the date range(s) property OnCheckDate: TCheckDateEvent Read fZeroDateIsValid write fZeroDateIsValid

delphi caret position tedit

Read FUseOSDateFormat write SetUseOSDateFormat DateFormat: can only be assigned when UseOSDateFormat property = false property DateFormat: string read GetDateFormat write SetDateFormat Property ColorTextOK: TColor read fColorOK write fColorOK Property ColorTextErr: TColor read fColorInvalid write fColorInvalid Property Epoch: integer read fEpoch write SetEpoch //see history 190503 published property AutoSelect Property Date: TDateTime read GetDate write SetDate Procedure KeyPress( var Key: Char) override Ĭonstructor Create(AOwner: TComponent) override Protected function DoCheckDate(Date: TDatetime): boolean virtual Procedure CMFontChanged( var Message: TMessage) message CM_FONTCHANGED Procedure CMExit( var Message: TCMExit) message CM_EXIT Procedure SetDateFormat( const value: string) Procedure SetUseOSDateFormat(value: boolean) įunction GetDisplayedDate( out dt: TDateTime): boolean Windows, SysUtils, Messages, Classes, Controls, Forms, StdCtrls, Graphics įunction(Sender: TObject Date: TDateTime): boolean of object












Delphi caret position tedit