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

# TMaskEdit

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

TMaskEdit is an Edit box with characters masked out to avoid unauthorized reading.

## Declaration

Source position: maskedit.pp line 326

`type TMaskEdit = class(TCustomMaskEdit)`
`public`
`property IsMasked: Boolean;` |  | True if a non-empty value has been assigned to EditMask.
`property EditText: string;` |  | Value entered in the control and obscured / formatted using the EditMask.
`published`
`property Align: TAlign;` |  | Specifies the placement of the control on its Parent control.
`property Alignment: TAlignment;` |  | The horizontal alignment for the text in the control (left, right, or centered).
`property Anchors: TAnchors;` |  | The set of anchor definitions for this control.
`property AutoSelect: Boolean;` |  | Enables auto-selection of text when focused.
`property AutoSize: Boolean;` |  | Allows automatic adjustment of the size for the control, according to its content.
`property BiDiMode: TBiDiMode;` |  | Indicates whether text controls use in bi-directional reading.
`property BorderSpacing: TControlBorderSpacing;` |  | Determines the inner and outer border spacing for this control.
`property BorderStyle: TBorderStyle;` |  | Indicates the line style drawn as a border around the control.
`property CharCase: TEditCharCase;` |  | Determines the case for the text in the masked edit control.
`property Color: TColor;` |  | The background color for the control.
`property Constraints: TSizeConstraints;` |  | Contains the minimum and maximum Width and Height for the control.
`property DragCursor: TCursor;` |  | The cursor shape shown during a drag operation.
`property DragKind: TDragKind;` |  | Indicates the action performed for a drag operation: drag-and-drop or drag-and-dock.
`property DragMode: TDragMode;` |  | Determines how a drag operation is started for the control.
`property Enabled: Boolean;` |  | Determines whether the control responds to mouse or keyboard input.
`property EnableSets: Boolean;`
`property Font: TFont;` |  | The font to be used for text display in this control.
`property MaxLength: Integer;` |  | Indicates the maximum number of characters that can be stored in the value for the control.
`property ParentBiDiMode: Boolean;` |  | Indicates whether the BiDiMode settings in the Parent control are used.
`property ParentColor: Boolean;` |  | Uses the Color from the Parent control, when enabled.
`property ParentFont: Boolean;` |  | Indicates if the Font from the Parent control is used in the control.
`property ParentShowHint: Boolean;` |  | If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.
`property PopupMenu: TPopupMenu;` |  | A context-sensitive menu that pops up when the right mouse button is clicked over this control.
`property ReadOnly: Boolean;` |  | Indicates if the user is prevented from changing the value for the Text in the control.
`property ShowHint: Boolean;` |  | Flag to determine if the hint is displayed for this control.
`property TabOrder: TTabOrder;` |  | Keyboard navigation order for the control when Tab is pressed.
`property TabStop: Boolean;` |  | Enables or disables keyboard navigation using the Tab key.
`property ValidationErrorMode: TMaskEditValidationErrorMode;` |  | Indicates the action taken when the control value is invalid for its mask.
`property Visible: Boolean;` |  | Indicates if the control is visible or hidden.
`property EditMask: string;` |  | Contains the mask characters classes and literals used to format/obscure the value for the control.
`property Text: TCaption;` |  | Contains the value for the control.
`property TextHint: TTranslateString;` |  | Default hint text shown when the Text property is empty for the control.
`property SpaceChar: Char;` |  | Contains the value used to represent Space (#32) characters in the control value.
`property OnChange: TNotifyEvent;` |  | Event handler signalled when the text for the control is changed.
`property OnClick: TNotifyEvent;` |  | Notification handler for mouse clicks.
`property OnDblClick: TNotifyEvent;` |  | Event handler signalled when a mouse double click occurs in the control.
`property OnDragDrop: TDragDropEvent;` |  | Event handler signalled when an object is dropped onto the control.
`property OnDragOver: TDragOverEvent;` |  | Event handler signalled when a control is dragged over the control instance.
`property OnEditingDone: TNotifyEvent;` |  | Event handler signalled when editing is completed for the control.
`property OnEndDock: TEndDragEvent;` |  | Event handler signalled for the end of a drag-dock operation.
`property OnEndDrag: TEndDragEvent;` |  | Event handler signalled for the end of a drag-drop operation.
`property OnEnter: TNotifyEvent;` |  | Event handler signalled when the control receives focus.
`property OnExit: TNotifyEvent;` |  | Event handler signalled when the control loses focus.
`property OnKeyDown: TKeyEvent;` |  | Handles a key down event for the focused control.
`property OnKeyPress: TKeyPressEvent;` |  | Handles a key press event for the focused control.
`property OnKeyUp: TKeyEvent;` |  | Handles a key up event for the focused control.
`property OnMouseDown: TMouseEvent;` |  | Event handler signalled when a mouse down event is handled for the control.
`property OnMouseEnter: TNotifyEvent;` |  | Event handler signalled when the mouse pointer has entered the control.
`property OnMouseLeave: TNotifyEvent;` |  | Event handler signalled when the mouse pointer has left the control.
`property OnMouseMove: TMouseMoveEvent;` |  | Event handler signalled when the mouse pointer is moved in the control.
`property OnMouseUp: TMouseEvent;` |  | Event handler signalled when a mouse up event is handled for the control.
`property OnMouseWheel: TMouseWheelEvent;` |  | Event handler for mouse wheel turned.
`property OnMouseWheelDown: TMouseWheelUpDownEvent;` |  | Event handler signalled for a downward movement of the mouse wheel.
`property OnMouseWheelUp: TMouseWheelUpDownEvent;` |  | Event handler signalled for an upward movement of the mouse wheel.
`property OnStartDock: TStartDockEvent;` |  | Event handler for the start of a docking operation.
`property OnStartDrag: TStartDragEvent;` |  | Event handler signalled for the start of a dragging operation.
`property OnValidationError: TNotifyEvent;`
`property OnUTF8KeyPress: TUTF8KeyPressEvent;` |  | Handler for a character entered by the user.
`end;`

## Inheritance

`TMaskEdit` |  | TMaskEdit is an Edit box with characters masked out to avoid unauthorized reading.
`TCustomMaskEdit` |  | The base class for TMaskEdit.
`TCustomEdit` |  | The base class for controls presenting editable text.
`TWinControl` |  | Implements a windowed control which can contain other child controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

TMaskEdit is used to display an Edit Box with the input text masked by a selected character specified by PasswordChar, usually an asterisk, or by EditMask (a complete string), specified in TCustomMaskEdit.

Useful for inputting passwords or capturing input using a specific format and validation.

## See also

TCustomMaskEdit |  | The base class for TMaskEdit.