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

# TCustomMaskEdit

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

TCustomMaskEdit - base class for TMaskEdit, an Edit box with characters masked out to avoid unauthorised reading

## Declaration

Source position: maskedit.pp line 147

`type TCustomMaskEdit = class(TCustomEdit)`
`protected`
`function GetText;` |  | Function to get text-string associated with control
`procedure SetText();` |  | Stores text in buffer
`function GetEditText; virtual;` |  | Get the text in the edit box (the string that has been masked)
`procedure SetEditText();` |  | SetEditText - specifies the text to appear in the Edit box
`procedure TextChanged; override;` |  | Procedure to deal with changes in text
`procedure Loaded; override;`
`procedure LMPasteFromClip(); message;` |  | LMPasteFromClip - LCL message method for pasting from clipboard
`procedure LMCutToClip(); message;` |  | LMCutToClip - LCL message method for cutting to clipboard
`procedure LMClearSel(); message;` |  | LMClearSel - LCL message method for clearing selected items
`function EditCanModify; virtual;` |  | If True, the Edit box is allowed to modify the contents
`procedure Reset; virtual;` |  | Reset - put back to its default state with mask appearing in Text box and no string input
`procedure DoEnter; override;` |  | DoEnter - perform the action for the OnEnter event handleer
`procedure DoExit; override;` |  | DoExit - perform the action for the OnExit event handler
`procedure KeyDown(); override;` |  | KeyDown - emulate the action of pressing the specified key (makes OnKeyDown respond)
`procedure KeyPress(); override;` |  | KeyPress - simulates the action of pressing the specified key
`procedure MouseUp(); override;` |  | MouseUp - a procedure that allows the programmer to simulate a mouse button being Up over the control, and initiates the same Action as that associated with the OnMouseUp event
`procedure CheckCursor;` |  |
`property EditText: String; [rw]` |  | The string that has been typed in the Edit Box and obscured by the Masking characters
`property IsMasked: Boolean; [r]` |  | isMasked - True if the text is masked
`property SpaceChar: Char; [rw]` |  | SpaceChar - the character that is to be used as a Space character
`public`
`procedure CutToClipBoard; override;` |  | CutToClipboard - remove the selected text from its original location and put it on the clipboard
`procedure PasteFromClipBoard; override;` |  | PasteFromClipboard - put a copy of the clipboard contents at the current writing position
`constructor Create(); override;` |  |
`procedure Clear;` |  | Clear - delete all text
`procedure ValidateEdit; virtual;` |  | Validate the string that has been typed in the edit box
`property EditMask: String; [rw]` |  | EditMask - the sequence of characters used to obscure the string being typed (typically a sequence of asterisks)
`property Text: String; [rw]` |  | The Text string that is to be masked (or not)
`end;`

## Inheritance

`TCustomMaskEdit` |  | TCustomMaskEdit - base class for TMaskEdit, an Edit box with characters masked out to avoid unauthorised reading
`TCustomEdit`
?
`TObject`

## Description

Custom Mask Edit: the base type for Mask Edit

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