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

# TCustomMaskEdit.DisableMask

Saves and disables the edit mask in the control.

## Declaration

Source position: maskedit.pp line 267

`protected function TCustomMaskEdit.DisableMask(`
`const NewText: string`
`):Boolean;`

## Arguments

`NewText` |  | New value for the Text property in the control.

## Function result

Returns True on success, or False when an edit mask is not used in the control.

## Description

DisableMask is a Boolean function used to save the current edit mask to an internal member, and then disables the edit mask in the control. This gives developers the opportunity to set any text in the control without affecting the control state. Whether or not the function succeeds, NewText will be set as the new Text in the control. There is no need to retain the saved internal mask or trim type; they are only set in SetEditMask.

Use RestoreMask to re-enable the saved edit mask for the control.