Provides the base class for grouped edit controls.

groupededit.pp provides a base class where a TCustomMaskEdit (derived) control is grouped inside a TCustomControl with another TControl derived class. The objective of this base class is to forward all relevant methods and properties of TCustomMaskEdit. Grouping the controls inside a TCustomControl is done, so that the resulting control can be aligned and anchored.

Initial implementation: 2016 by Bart Broersma

Implements the edit control used in TCustomAbstractGroupedEdit.

TGEEdit is a TCustomMaskedit descendant which implements the edit control used in TCustomAbstractGroupedEdit. TGEEdit provides an overridden method to handle Tab keys. The key can be forwarded to the control that owns the class instance, to the ancestor class, or simply discarded.

TGEEdit is the type used to implement the BaseEditor property in TCustomAbstractGroupedEdit.

TWinControl.PerformTab
Handles Tab key presses for the control. True when the Tab key has been handled. True forwards the key to the ancestor class. Class type used to create instances of TGEEdit. Implements a grouped edit control.

TCustomAbstractGroupedEdit is a TCustomControl descendant which implements a grouped edit control. TCustomAbstractGroupedEdit is composed of a TGEEdit control that provides an editor for the control value, and a related TControl descendant.

TCustomAbstractGroupedEdit basically acts as a container for the grouped controls, and ensures that Alignment and Anchoring are performed. TCustomAbstractGroupedEdit forwards relevant methods and properties to the BaseEditor or Buddy members, and receives event notifications from both.

Derived classes should implement their own BaseEditor and Buddy properties so that they will have the correct class types.

TCustomControl TControl
Gets the value for the Alignment property. Value for the property. Gets the value for the AutoSelect property. Value for the property. Gets the value for the AutoSelected property. Value for the property. Gets the value for the CanUndo property. Value for the property. Gets the value for the CaretPos property. Value for the property. Gets the value for the CharCase property. Value for the property. Gets the value for the Color property. Value for the property. Gets the value for the DirectInput property. Value for the property. Gets the value for the EchoMode property. Value for the property. Gets the value for the EditMask property. Value for the property. Gets the value for the EditText property. Value for the property. Gets the value for the HideSelection property. Value for the property. Gets the value for the IsMasked property. Value for the property. Gets the value for the MaxLength property. Value for the property. Gets the value for the Modified property. Value for the property. Gets the value for the NumbersOnly property. Value for the property. Gets the value for the ParentColor property. Value for the property. Gets the value for the PasswordChar property. Read access for the value is redirected to the PasswordChar property in BaseEditor. Value for the property. Gets the value for the ReadOnly property. Value for the property. Gets the value for the SelLength property. Read access to the property value is redirected to BaseEditor. Value for the property. Gets the value for the SelStart property. Read access to the property value is redirected to BaseEditor. Value for the property. Gets the value for the SelText property. Read access to the property value is redirected to BaseEditor. Value for the property. Gets the value for the TabStop property. Read access to the property value is redirected to BaseEditor. Value for the property. Gets the value for the TextHint property. Read access to the property value is redirected to BaseEditor. Value for the property. Executes the click event handler for the Buddy control. Object instance for the event notification. Executes the click event handler for the BaseEditor control. Object instance for the event notification. Executes the double click event handler for the BaseEditor control. Object instance for the event notification. Executes the OnChange event handler for the BaseEditor control. Object instance for the event notification. Executes the OnEditContextPopup handler for the control. Object instance for the event. TPoint instance with the coordinates for the mouse pointer when the event occurred. Returns True if the context menu was handled in the handler routine. Executes the OnEditDragDrop event handler for the control. Object instance for the event notification. Object instance which was dropped onto the composite control. Horizontal coordinate for the mouse pointer when it was released to drop the dragged object. Vertical coordinate for the mouse pointer when it was released to drop the dragged object. Executes the OnEditDragOver event handler for the control. TDragState Object instance for the event notification. Object instance which was dragged over the control. Horizontal position for the mouse pointer when the dragged object entered or left the control. Vertical position for the mouse pointer when the dragged object entered, left, or was moved over the control. Indicates whether the dragged object entered, left, or changed position on the control. Returns True when the drag over event is valid for the control. Executes the OnEditingDone event handler for the control. Object instance for the event notification. Executes the OnEditEnter event handler for the control. Object instance for the event notification. Executes the OnEditExit event handler for the control. Object instance for the event notification. Executes the OnEditEndDrag event handler for the control. Object instance for the event notification. Executes the OnEditKeyDown event handler for the control. Object instance for the event notification. Executes the OnEditKeyPress event handler for the control. Object instance for the event notification. Executes the OnEditKeyUp event handler for the control. Object instance for the event notification. Executes the OnEditMouseDown event handler for the control. Object instance for the event notification. Executes the OnEditMouseUp event handler for the control. Object instance for the event notification. Sets the value for the Alignment property. Write access for the property value is redirected to the Alignment property in BaseEditor. TCustomEdit.Alignment New value for the property. Sets the value for the AutoSelect property. Write access for the property value is redirected to BaseEditor. TCustomEdit.AutoSelect New value for the property. Sets the value for the AutoSelected property. Write access to the property value is redirected to BaseEditor. New value for the property. Sets the value for the CaretPos property. Write access to the property value is redirected to BaseEditor. New value for the property. Sets the value for the CharCase property.

Write access to the property value is redirected to BaseEditor.

New value for the property. Sets the value for the EchoMode property. Write access to the property value is redirected to BaseEditor. New value for the property. Sets the value for the EditMask property. Write access to the property value is redirected to BaseEditor. New value for the property. Sets the value for the EditText property. Write access to the property value is redirected to BaseEditor. New value for the property. Sets the value for the HideSelection property.

Read and write access for the property value is redirected to BaseEditor.

TCustomEdit.HideSelection
New value for the property. Sets the value for the Layout property. New value for the property. Sets the value for the MaxLength property. New value for the property. Sets the value for the Modified property. New value for the property. Sets the value for the NumbersOnly property. TCustomEdit.NumbersOnly New value for the property. Sets the value for the ParentColor property. New value for the property. Sets the value for the PasswordChar property. TCustomEdit.PasswordChar New value for the property. Sets the value for the PopupMenu property. New value for the property. Sets the value for the ReadOnly property. New value for the property. Sets the value for the SelLength property. New value for the property. Sets the value for the SelStart property. New value for the property. Sets the value for the SelText property. New value for the property. Sets the value for the Spacing property. New value for the property. Sets the value for the TabStop property. New value for the property. Sets the value for the TextHint property. New value for the property. Registers the widget set class used to create new instances of the grouped edit.

Calls the inherited method, and registers the following properties to be skipped during LCL component streaming:

TextHintFontColor
Used in a previous version of Lazarus
TextHintFontStyle
Used in a previous version of Lazarus
TCustomControl.WSRegisterClass
Calculates the preferred size for the control with optional space reserved by theme services.

CalculatePreferredSize is an overridden procedure used to calculate the dimensions for the control. The calculated values are returned in PreferredWidth and PreferredHeight.

CalculatePreferredSize calls the inherited method, and forwards the method call to the BaseEditor control. When AutoSizeHeightIsEditHeight is set to True, the value calculated as the control height in BaseEditor is used as the value in the PreferredHeight argument. The value in PreferredWidth is always set to zero (0).

TWinControl.CalculatePreferredSize
Width for the control; always zero in the method. Height for the control. Indicates if additional space needed for theme services is reserved. Creates the TControl instance assigned to the Buddy property.

CreateBuddy is a TControl function used to create the TControl instance assigned to the Buddy property. CreateBuddy calls GetBuddyClassType to get the class reference used to create new instances of the control, and calls its Create method using the current class instance as the owner for the TControl instance.

CreateBuddy is used the Create constructor.

TControl instance created in the method. Creates the TGEEdit instance used in the BaseEditor property. TGEEdit instance created in the method. Gives focus to the control, and optionally selects text in its editor.

FocusAndMaybeSelectAll is a procedure used to give focus to the control, and to optionally select text in its editor. FocusAndMaybeSelectAll calls the SetFocus method in BaseEditor to ensure that the editor portion of the grouped edit control has focus.

The value in AutoSelect is used to determine the selected text in the BaseEditor control. When AutoSelect is set to True, the SelectAll method in BaseEditor is called to select all of the content in the control. When False, the SelStart method in BaseEditor is set to the maximum value for an Integer, ensuring that the caret position is located at the end of the control value.

FocusAndMaybeSelectAll is used in the implementation of the BuddyClick method.

Gets the class reference used to create the BaseEditor for the control. Class reference used to create the BaseEditor for the control. Gets the class reference used to create the Buddy for the control. Class reference used to create the Buddy for the control. Gets the default size for new instances of the control. Default size for new class instances. Sets the value for the DirectInput property. New value for the property. Gets the value for the text in the control. Value for the text in the control. Sets the value for the text in the control. New value for the text in the control. Gets the popup menu for the BaseEditor in the control. The popup menu for the BaseEditor in the control. Gets the Caption used in the Buddy property. Caption used in the Buddy property. Gets the value for the BuddyCursor property. Value for the property. Gets the value for the BuddyHint property. Value for the property. Gets the value for the BuddyWidth property. Value for the property. Gets the Visible property for the Buddy control. True if the Buddy control is visible. Sets the Caption used in the Buddy property. Value assigned as the Caption in the Buddy property. Sets the cursor shape used in the Buddy property. Value assigned as the Cursor in the Buddy property. Sets the Hint displayed for the Buddy property. Value assigned as the Hint in the Buddy property. Sets the Width used for the Buddy property. Value assigned as the Width in the Buddy property. Sets the value for the Visible property in the Buddy control. True to display the Buddy control, False to hide it. Performs actions needed when the Buddy control is clicked.

Used in internal methods to redirect events from the Buddy control to the container class (the current class instance).

BuddyClick uses the value in ReadOnly to determine if the grouped edit control should respond to a Click event from the Buddy control. When ReadOnly is True, no actions are performed in the method.

BuddyClick signals the OnBuddyEvent handler (when assigned). When the BuddyClick code points to this method (and not an overridden one in a descendant), the FocusOnBuddyClick method is called to determine if focus and selection changes are handled by the current class instance.

Derived controls may override BuddyClick to run a dialog after calling the inherited method. In this scenario, selecting the text in this method is most likely premature. It is the responsibility of the derived control to implement focus changes and selection as needed.

Performs actions needed when the control is entered.

DoEnter is an overridden procedure used to perform actions needed when the control is entered using keyboard navigation. DoEnter calls the inherited DoEnter method to signal the OnEnter event handler, and calls the SetFocus method in BaseEditor at run-time. The focus change is not performed at design-time.

TWinControl.DoEnter
Signals the OnEditChange event handler, when assigned.

EditChange is a procedure used to signals the OnEditChange event handler, when assigned. EditChange is used in the implementation of the InternalOnEditChange method, which is assigned as the OnChange event handler in the BaseEditor property.

Signals the internal OnEditClick event handler, when assigned. Signals the OnContextPopup event handler (when assigned). Mouse coordinates for the context pop-up. True if the pop-up was handled for the control. Signals the OnDblClick event handler (when assigned). Signals the OnDragDrop event handler (when assigned). Contains the dragged object for the event notification. Horizontal coordinate for the mouse pointer when it was released. Vertical coordinate for the mouse pointer when it was released. Signals the OnDragOver event handler (when assigned). Object instance with the dragged object for the drag over event. Horizontal coordinate for the mouse pointer when the dragged object entered, left, or was moved on the control. Vertical coordinate for the mouse pointer when the dragged object entered, left, or was moved on the control. Indicates whether the dragged object entered, left, or was moved on the control. Returns True if the event handler accepts or responds to the drag over event. Signals the OnEditEditingDone event handler (when assigned).

EditEditingDone is a method used to signal the OnEditingDone event handler (when assigned) for the grouped edit control. The method is assigned to the OnEditingDone event handler in BaseEditor in the constructor for the class instance. It ensures that the grouped edit control performs the OnEditingDone event as a surrogate for the BaseEditor control.

An application can implement an assign a routine to OnEditingDone to perform any actions needed when editing has been completed in the BaseEditor control.

TControl.OnEditingDone
Signals the OnEditEndDrag event handler (when assigned).

Called from the internal end drag handler routine assigned to the BaseEditor for the grouped edit control.

TControl.OnEndDrag
Object instance which is the drop target for the drag operation. Horizontal mouse coordinate where the mouse button was released. Vertical mouse coordinate where the mouse button was released. Signals the OnEnter event handler (when assigned). TWinControl.OnEnter Signals the OnExit event handler (when assigned). TWinControl.OnEExit Signals the OnKeyDown event handler (when assigned).

Called from the internal key down handler routine assigned to the BaseEditor for the grouped edit control.

Virtual key code for the key down event notification. Ctrl, Alt, or Shift modifier for the key code in the key down event notification. Signals the OnKeyPress event handler (when assigned).

Called from the internal key press handler routine assigned to the BaseEditor for the grouped edit control.

Character with the value for the key press notification. Signals the OnKeyUp event handler (when assigned). Virtual key code for the key up event notification. Ctrl, Alt, or Shift modifier for the key code in the key up event notification. Signals the OnMouseDown event handler (when assigned). Mouse button for the mouse down event notification. Ctrl, Alt, or Shift modifier for the mouse button down event notification. Horizontal mouse coordinate for the mouse button down event notification. Vertical mouse coordinate for the mouse button down event notification. Signals the OnMouseUp event handler (when assigned). TControl.OnMouseUp Mouse button for the button up event notification. Ctrl, Alt, or Shift modifier for the mouse button up event notification. Horizontal mouse coordinate where the mouse button up event occurred. Vertical mouse coordinate where the mouse button up event occurred. Signals the OnMouseEnter event handler (when assigned). TControl.OnMouseEnter Signals the OnMouseLeave event handler (when assigned). TControl.OnMouseLeave Signals the OnMouseMove event handler (when assigned). TControl.OnMouseMove Ctrl, Alt, or Shift modifier for the mouse move notification. Horizontal mouse coordinate for the mouse event. Vertical mouse coordinate for the mouse event. Signals the OnMouseWheel event handler (when assigned). TControl.OnMouseWheel Ctrl, Alt, or Shift modifier for the mouse wheel event notification. Number of units (or notches) that the mouse wheel was moved in the notification event. TPoint instance with the coordinates for the mouse pointer in the notification event. Returns True if the mouse wheel event is handled by the control. Signals the OnMouseWheelUp event handler (when assigned). TControl.OnMouseWheelUp Ctrl, Alt, or Shift modifier for the mouse wheel event. TPoint instance with the coordinates for the mouse pointer in the notification event. Returns True if the mouse wheel event is handled by the control. Signals the OnMouseWheelDown event handler (when assigned). TControl.OnMouseWheelDown Ctrl, Alt, or Shift modifier for the mouse wheel event. TPoint instance with the coordinates for the mouse pointer in the notification event. Returns True if the mouse wheel event is handled by the control. Signals the OnUtf8KeyPress event handler (when assigned). UTF-8-encoded value for the key press event. Signals the OnStartDrag event handler (when assigned). Object instance dragged in the drag notification. Updates border spacing in BaseEditor for the Layout and visibility of the Buddy control. TControl.BorderSpacing Forwards a CheckCursor method call to the BaseEditor for the control. Handles the control message received when the ParentColor property is changed.

CMParentColorChanged is method used to handle the CM_PARENTCOLORCHANGED control message for the grouped edit control. It reimplements the method introduced in the TControl ancestor to ensure that values in the ParentColor and Color properties are updated for the composite control. When ParentColor is enabled, the Color value from the Parent control is applied to the class instance.

TCustomControl.SetColor TControl.Parent TControl.ParentColor TControl.CMParentColorChanged
Message instance received by the control and handled in the method. Indicates if BaseEditor can be modified. Contains the value returned from the EditCanModify method in BaseEditor. Gets the offsets for the current text selection in the control. Starting position for the text selection in the control. Ending position for the text selection in the control. Gets the value for the Spacing property. Value for the property. Sets the current text selection in the control. Initial position selected in the control. Final position selected in the control. Performs actions when the control has finished loading in the LCL streaming mechanism. Forwards a Reset method call to the BaseEditor in the control. Sets the value for the AutoSize property.

SetAutoSize is overridden in TCustomAbstractGroupedEdit, and calls the inherited method on entry. It ensures that the new value for the property is applied to AutoSize property in BaseEditor.

New value for the property. Sets the value for the Color property. New value for the property. Sets the value for the Cursor property. TControl.Cursor New value for the property. Indicates if the height or width is affected during auto-adjust.

AWidth is set to True in TCustomAbstractGroupedEdit. AHeight is set to False when AutoSize is True, and vice-versa.

Returns True in TCustomAbstractGroupedEdit. Returns True if AutoSize is not enabled for the grouped edit control. Indicates if the text in the control is automatically selected when focus is received. Indicates if the current text selection was performed automatically. Represents the associated TControl instance in the grouped edit control.

Buddy normally contains a TSpeedButton, TUpDown or similar control. Derived classes may implement a different class type for the control using the GetBuddyClassType method.

Caption used for the Buddy control. Cursor shape used for the Buddy control. Hint displayed for the Buddy control. Width for the Buddy control. Background color for the BaseEditor on the control.

Does not apply to the Buddy control (button); buttons always used the system-defined color for the button surface.

TControl.Color
Indicates if text can be entered directly into the BaseEditor control. Represents the control used as the editor for the value in the grouped edit control. Contains the masking characters used in the editor for the control.

EditMask is a String property that contains the masking characters used in the editor for the control. EditMask redirects read and write access for the property to the TGEEdit instance in the BaseEditor property.

TCustomMaskEdit.EditMask
Contains the value entered in the control including masking characters.

EditText is a String property which contains the value entered in the control including masking characters. Read and write access to the property value are redirected to the BaseEditor control.

Use the Text property to access the actual characters in the control value, excluding any characters introduced by an edit mask.

TCustomMaskEdit.EditText
Determines if the control receives focus when the Buddy control is clicked.

FocusOnBuddyClick is a Boolean property which determines if the control receives focus (and a potential change to the text selection in the editor) when the Buddy control is clicked. The default value for the property is False.

FocusOnBuddyClick is used in the implementation of the BuddyClick method.

Indicates if an edit mask is in use in the BaseEditor in the grouped edit control. Controls the alignment of the edit control and its associate.

Layout is a TLeftRight property that determines the setting for the Align property in the BaseEditor and the Buddy controls. The default value for the property is taLeftJustify.

Changing the value in Layout cause the Align properties in the grouped controls to be set to the appropriate values. For example:

taLeftJustify
Causes the Buddy control to be right aligned (opposite of the editor control).
taRightJustify
Causes the Buddy control to be left aligned (opposite of the editor control).
Spacing used between the BaseEditor and the Buddy controls.

Spacing is an Integer property which contains the number of pixels reserved as spacing between the BaseEditor and Buddy controls. The default value for the property is 0, and reserves no space between the controls on the grouped edit control. Changing the value for the property causes the UpdateSpacing method to be called to reposition the Buddy control using the Layout for the grouped edit control.

Use Layout to set the position for the Buddy control relative to the BaseEditor control. Spacing is applied to BaseEditor as BorderSpacing on the edge specified in Layout.

TControl.BorderSpacing
Event handler signalled when the Buddy control is clicked. Constructor for the class instance.

Create is the overridden constructor for the class instance. Create allocates resources needed for the BaseEditor and Buddy properties prior to calling the inherited constructor. The default values for properties and event handlers are assigned in the constructor, including those needed in the BaseEditor and Buddy properties.

The Buddy control is aligned to the right edge of the current class instance.

BaseEditor is aligned to the remaining client area in the control. Event handlers in BaseEditor are set to the internal methods used to redirect mouse and keyboard events for the current class instance.

Both Buddy and BaseEditor use the current class instance in their Parent properties.

Owner of the class instance. Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy calls the inherited destructor.

Resources allocated for BaseEditor and Buddy in the constructor are not explicitly freed in the destructor; that action is performed using the Notification that occurs when this class instance (which is the owner for those resources) is freed.
Sets the focus to the editor in the control.

SetFocus is an overridden procedure which gives focus to the grouped edit control. SetFocus redirects the method call to the SetFocus method in the BaseEditor for the control.

Performs actions needed when the control receives focus.

Focused is an overridden Boolean function used to perform actions needed when the control receives focus. Focused calls the Focused method in the BaseEditor for the control.

TWinControl.Focused
True when the control has focus. Removes the text content in the control.

Clear is a procedure used to remove the text content in the control. Clear class the Clear method in BaseEditor.

Clears the content for the current selection in the control. Copies the content in the control to the clipboard. Copies content in the control to the clipboard, and removes it from the control. Pastes content into the control from the clipboard. Selects all of the content in the control. Reverses the last edit performed on the control value. Performs actions needed to validate the value for the control.

ValidateEdit is a procedure used to perform actions needed to validate the value for the control. The method calls the ValidateEdit method in the BaseEditor member to validate its Text against the edit mask assigned to the property.

Allows automatic adjustment of the size for the control, according to its content.

AutoSize is a Boolean property redeclared in TCustomAbstractGroupedEdit with an overridden write access specifiers. AutoSize allows the control to automatically adjustment its size to the content in the control.

The default value for the property is True.

TControl.AutoSize TControl.SetAutoSize Using AutoSize
Indicates if the height for BaseEditor is used as the height for the control when auto-sizing.

AutoSizeHeightIsEditHeight is a Boolean property which indicates if the height for BaseEditor is used as the height for the control when auto-sizing is enabled. The default value for the property is True.

AutoSizeHeightIsEditHeight is used in the implementation of the CalculatePreferredSize method called when CanAutoSize is True.

Indicates the text alignment used for the control value.

Alignment is a TAlignment property which indicates the text alignment used for the control value in the BaseEditor control. Read and write access for the property value are redirected to the BaseEditor control.

The default value for the property is taLeftJustify. See TAlignment in the RTL for more information about the values in the enumerated type and their meanings.

TCustomEdit.Alignment TAlignment
Indicates if the Undo method can used to revert changes to the control value. Position of the editing caret in the control.

CaretPos is a TPoint property which contains the coordinates for the editing caret in the grouped edit control. The property value is read from and written to the CaretPos property in BaseEditor.

See TCustomEdit.CaretPos for move information about the property and its usage.

TCustomEdit.CaretPos
Controls the case conversion used for a value entered in the control.

CharCase is a TEditCharCase property that controls the case conversion used (if any) for a value entered in the control. The default value for the property is ecNormal, and indicates that no case conversion is used. See TEditCharCase for more information about the enumeration values supported for the type.

Read and write access to the property value are redirected to the BaseEditor control.

The value in CharCase can automatically be changed to ecNormal when an edit mask is assigned to the control.
TMaskEdit.CharCase TCustomMaskEdit.EditMask TEditCharCase
Indicates if the color in the Parent control is used.

ParentColor is a Boolean property which indicates if the Color from the Parent control is used instead the value assigned to the control. When this property is True, all changes to Color in the parent will also be applied to the Color in the control, ensuring that they both contain the same value. If the Color of the control is changed by the application, then ParentColor will be automatically set to False.

Read and write access to the property value are redirected to the BaseEditor control. The default value for the property is False.

Using ParentColor when the Color value is clDefault can cause problems in resolving the actual color value. To obtain the Color property of a control while taking into account clDefault and ParentColor, use the GetColorResolvingParent method. This method might return a non-RGB color, but will never return clDefault. To obtain a purely RGB result use the GetRGBColorResolvingParent method.

Indicates if characters entered in the control value are hidden, displayed, or obscured.

EchoMode is a TEchoMode property which controls whether text entered using the control is displayed normally, obfuscated, or hidden. The property value is read from and written to the EchoMode property in the BaseEditor control.

The default value for the property is emNormal, and allows EditText to be displayed normally without obfuscation. Use emNone is hide the value for the control by displaying a Space (#32) for each of the characters. Use emPassword to obfuscate the control value by displaying the value in PasswordChar for each of the characters in EditText.

TCustomEdit.EchoMode TEchoMode
Hides the current text selection when the control loses focus.

HideSelection is a Boolean property which indicates whether the current text selection is hidden when the control loses focus. The value for the property is read from and written to the HideSelection property in the BaseEditor control. The default value for the property is False, and causes the current text selection to be retained when the control loses focus.

HideSelection affects the style flags included in the creation parameters for the control.

Use AutoSelect to indicate whether the complete content in EditText is automatically selected when the controls receives focus. Use AutoSelected to determine whether the text selection was performed automatically, or manually using the SelStart / SelLength / SetSel methods.

Maximum number of characters allowed in the editor for the control.

MaxLength is an Integer property with the maximum number of characters allowed in EditText. The property value is read from and written to the MaxLength property in BaseEditor. The default value (0) indicates that a maximum length is not enforced.

Use EditMask to specify a mask that is applied to the stored value for the control.

In Delphi MaxLength only limits user input. The LCL actually restricts the maximum length of the stored text; this simplifies the implementation for non-Win32 widgetsets.

Indicates if the value for the control has been changed by the user.

Modified is a Boolean property which indicate whether the value for the control has been changed by the user. The property value is read from and written to the Modified property in the BaseEditor control. The value in Modified is True if EditText (BaseEditor.Text) was changed using the keyboard, or by pasting a value from the clipboard. It contains False if the value was changed in program code.

Use event handlers, like OnEditingDone or OnChange, to perform actions needed when the value for the control has been changed.

Indicates if the edit control accepts numeric values only.

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.

TCustomEdit.NumbersOnly
Contains the character displayed to obfuscate the text on the control when a value is entered or displayed. PopupMenu for the control.

PopupMenu is a TPopupMenu property with the context menu used for the BaseEditor in the grouped edit control. Read and write access for the property value are redirected to the PopupMenu property in BaseEditor.

When a new value is assigned to PopupMenu, the context menu is also assigned to the Buddy control if it currently shares the same menu instance. Buddy is not updated if BaseEditor and Buddy use different pop-up menus.

Modified in LCL 3.0 to update the pop-up menu in Buddy when needed. TCustomEdit.PopupMenu
Indicates whether the value for the control can be changed. Number of characters in the current selection for the control. Starting position for the current selection in the control. Returns the selected text in the control.

GetSelText is a String function used to get the selected text in the grouped edit control. Read and write access to the property are redirected to the BaseEdit property.

TCustomEdit.SelText
Indicates if the control can be reached using Tab navigation.

TabStop is a Boolean property which indicates if the control can be accessed using Tab or Shift+Tab keyboard navigation. Read and write access to the property value is redirected to the BaseEditor property.

TWinControl.TabStop
Default hint text shown when the Text property is empty for the grouped edit control.

TextHint is a TTranslateString property which contains the inline hint text displayed for the control. It is displayed in the editable area for the TCustomEdit when the Text property is empty. Some platforms may refer to this feature as a "placeholder" or "editing hint". The value in TextHint is normally displayed using the color in clGrayText.

The display behavior for TextHint is platform-specific. On some platforms, the text hint is displayed any time the value in Text is empty. For others, it is displayed only when the control does not have focus.

Read and write access to the property value are redirected to the BaseEditor property. Setting a new value in TextHint causes the widgetset class to be notified, and the value is displayed in the edit control when allowed. If the new property value is an empty string (''), the text hint is removed from the control.

For platforms that do not provide native support for TextHint, an emulated text hint is displayed. This is a TCustomEdit control created to enable the feature, and can be displayed only when the original control does not have focus.

TextHint is different than Hint, which displays a balloon tip when ShowHint is set to True and the mouse is over the control.

TCustomEdit.TextHint TCustomEdit.CanShowEmulatedTextHint TControl.Text TControl.Hint
Event handler signalled when the value for the control is changed.

OnChange is a TNotifyEvent property that contains the event handler signalled when the value for the control is changed. OnChange is triggered from the EditChange method called when the BaseEditor control has modified its value.

Event handler signalled for UTF-8 key press events.

OnUTF8KeyPress uses the InternalOnEditUtf8KeyPress method as the default event handler for the control, as assigned in the Create constructor.

TWinControl.OnUTF8KeyPress