[Overview][Types][Classes][Index] Reference for unit 'GroupedEdit' (#lcl)

TCustomAbstractGroupedEdit.NumbersOnly

Indicates if the edit control accepts numeric values only.

Declaration

Source position: groupededit.pp line 297

public property TCustomAbstractGroupedEdit.NumbersOnly : Boolean
  read GetNumbersOnly
  write SetNumbersOnly
  default False;

Description

NumbersOnly is a Boolean property which indicates whether the Text for the control is limited to characters which represent numeric digits. The default value for the property is False, and allows any character valid for the type to be entered. When set to True, only the characters '0'..'9' are accepted in Text. '+', '-', ',', and '.' are not numeric digits.

The value for the property is read from and written to the NumbersOnly in the BaseEditor for the control (TGEEdit/TCustomMaskEdit).

NumbersOnly is not supported on all platform for the LCL; GTK 2 does not support the property.

Versions of Windows prior to Windows 95 did not enforce the ES_NUMBER style flag. It could be specified, but still allowed any value to be manually entered into the edit control. Some version of Windows allowed copy (Ctrl+C) and paste (Ctrl+V) to be used to insert non-numeric values - even when NumbersOnly is set to True.

See also

TGEEdit

  

Implements the edit control used in TCustomAbstractGroupedEdit.

TCustomEdit.NumbersOnly

  

Indicates if the edit control accepts numeric values only.


Version 4.0 Generated 2025-05-03 Home