Sign in Join
FPDoc Onlineexperiment

TCustomAbstractGroupedEdit.FocusAndMaybeSelectAll procedure

Member of TCustomAbstractGroupedEditprotectedIn unit GroupedEdit

Gives focus to the control, and optionally selects text in its editor.

Declaration

pascal
procedure FocusAndMaybeSelectAll

Description

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.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.