[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'EditBtn' (#lcl)

# TDateEdit

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TDateEdit - an EditBox to hold a date, with an attached SpeedButton that will summon a date selection (calendar) dialog

## Declaration

Source position: editbtn.pas line 326

`type TDateEdit = class(TCustomEditButton)`
`protected`
`function GetDefaultGlyph; override;` |  | GetDefaultGlyph - find the default glyph for the SpeedButton
`function GetDefaultGlyphName; override;` |  | GetDefaultGlyphName - find the name for the default glyph for the SpeedButton
`procedure DoButtonClick(); override;` |  | DoButtonClick - software emulation of the OnButtonClick event
`procedure DblClick; override;` |  | DblClick - a procedure that allows the programmer to simulate a mouse double-click over the control, and initiates the same Action as that associated with the OnDblClick event
`procedure SetDateMask; virtual;`
`public`
`constructor Create(); override;` |  | Create - constructor for TDateEdit: calls inherited Create and sets defaults
`procedure DateFormatChanged; virtual;` |  | DateFormatChanged - method for changing date format
`function GetDateFormat;` |  | GetDateFormat - returns the format for the date
`property Date: TDateTime; [rw]` |  |
`property Button;` |  | Button - the SpeedButton that is attached to the Edit Box
`published`
`property DialogTitle: TCaption; [rws]` |  | DialogTitle - the caption to appear on the dialog
`property CalendarDisplaySettings: TDisplaySettings; [rw]` |  | CalendarDisplaySettings - governs how the calendar dialog is to be displayed
`property OnAcceptDate: TAcceptDateEvent; [rw]` |  | OnAcceptDate - event handler for accepting the date selected in the calendar dialog
`property OnCustomDate: TCustomDateEvent; [rw]` |  | OnCustomDate - event handler for inserting a custom date
`property OKCaption: TCaption; [rw]` |  | OKCaption - the caption to be used for the OK button in the calendar dialog
`property CancelCaption: TCaption; [rw]` |  | CancelCaption - the caption to be used for the Cancel button in the Calendar dialog
`property ReadOnly;` |  | ReadOnly - the contents of the edit box may only be read, not written or erased
`property DefaultToday: Boolean; [rw]` |  | DefaultToday - if True, the current date is offered as the default date (value is False by default)
`property DateOrder: TDateOrder; [rw]`
`property ButtonOnlyWhenFocused;` |  | ButtonOnlyWhenFocused - if True, the SpeedButton only appears when focus is given to the EditButton control
`property ButtonWidth;` |  | ButtonWidth - the width of the SpeedButton attached to the Edit Box
`property Action;` |  | The action to be associated with this control
`property Align;` |  | Used to align the control to the top, bottom, left or right of its client.
`property Anchors;` |  | The set of anchor definitions for this control
`property AutoSize;` |  | Whether auto-size is to be used
`property AutoSelect;` |  | AutoSelect : if True, the edit control will select all its text when it receives focus or when the Enter key is pressed.
`property BorderSpacing;` |  | Determines the border spacing for this control
`property BorderStyle;`
`property Color;` |  | Determine the colour for the current control
`property Constraints;` |  | Determine Constraints (max and min height and width) for this control
`property CharCase;` |  | CharCase - rules for what case to use (upper or lower) to display text
`property DirectInput;` |  | DirectInput - if True, direct data input to the Edit Box is permitted
`property Glyph;` |  | Glyph - the small graphic image on the SpeedButton, which ought to indicate its function
`property NumGlyphs;` |  | NumGlyphs - the number of available glyphs
`property DragMode;` |  | DragMode - whether manual or automatic
`property EchoMode;` |  | EchoMode - how to echo keypresses on screen: normal (returning the actual character for that key), all upper or lower case, or a masking character as used in entering passwords
`property Enabled;` |  | Whether the control is Enabled. If not, it usually appears 'greyed-out'
`property Font;` |  | The Font to be used for text in this control
`property MaxLength;` |  | MaxLength : maximum length allowed for text string
`property OnChange;` |  | OnChange - event handler for any change in text
`property OnChangeBounds;` |  | Event handler for a change in bounds of the control
`property OnClick;` |  | Event Handler for mouse click
`property OnEditingDone;` |  | Event handler when editing is done
`property OnEnter;` |  | OnEnter - event handler for when the mouse enters the control, and the control receives focus
`property OnExit;` |  | OnExit - event handler for when the mouse leaves the control and it loses focus
`property OnKeyDown;` |  | OnKeyDown - event handler for instance when key is down while control has focus
`property OnKeyPress;` |  | OnKeyPress - event controller for a key being pressed while the control has focus. To properly handle national chars use UTF8KeyPress instead.
`property OnKeyUp;` |  | OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus
`property OnMouseDown;` |  | Event handler for when a mouse button is pressed down
`property OnMouseMove;` |  | Event handler for mouse movement within the current control
`property OnMouseUp;` |  | Event handler for when the mouse button is released, ie "up"
`property OnResize;` |  | Event Handler for resize of control
`property OnUTF8KeyPress;` |  | UTF8KeyPress - event controller for a key being pressed while the control has focus.
`property ParentFont;` |  | ParentFont - should the control use the same font as the parent? Default is true
`property ParentShowHint;` |  | ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true
`property PasswordChar;` |  | PasswordChar : the character which appears in the Edit box replacing and masking the actual character typed
`property PopupMenu;` |  | PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control
`property ShowHint;` |  | Flag to determine: Is hint to be displayed for this control?
`property TabStop;` |  | Is the control in the sequence of controls accessed by successive presses of the Tab key?
`property TabOrder;` |  | The place this control occupies in the list of tabs
`property Visible;` |  | Visible - can the control be seen?
`end;`

## Inheritance

`TDateEdit` |  | TDateEdit - an EditBox to hold a date, with an attached SpeedButton that will summon a date selection (calendar) dialog
`TCustomEditButton` |  | TCustomEditButton - base class for TEditButton, an Edit Box with attached Speed Button
`TCustomMaskEdit` |  | TCustomMaskEdit - base class for TMaskEdit, an Edit box with characters masked out to avoid unauthorised reading
`TCustomEdit`
?
`TObject`

The latest version of this document can be found at lazarus-ccr.sourceforge.net.