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

TCustomAbstractGroupedEdit

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

Implements a grouped edit control.

Declaration

Source position: groupededit.pp line 62

type TCustomAbstractGroupedEdit = class(TCustomControl)

protected

  class procedure WSRegisterClass; override;

  

Registers the widget set class used to create new instances of the grouped edit.

  procedure CalculatePreferredSize(); override;

  

Calculates the preferred size for the control with optional space reserved by theme services.

  function CreateBuddy; virtual;

  

Creates the TControl instance assigned to the Buddy property.

  function CreateEditor; virtual;

  

Creates the TGEEdit instance used in the BaseEditor property.

  procedure FocusAndMaybeSelectAll;

  

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

  function GetEditorClassType; virtual;

  

Gets the class reference used to create the BaseEditor for the control.

  function GetBuddyClassType; virtual; abstract;

  

Gets the class reference used to create the Buddy for the control.

  class function GetControlClassDefaultSize; override;

  

Gets the default size for new instances of the control.

  procedure SetDirectInput(); virtual;

  

Sets the value for the DirectInput property.

  function RealGetText; override;

  

Gets the value for the text in the control.

  procedure RealSetText(); override;

  

Sets the value for the text in the control.

  function GetEditPopupMenu;

  

Gets the popup menu for the BaseEditor in the control.

  function GetBuddyCaption;

  

Gets the Caption used in the Buddy property.

  function GetBuddyCursor;

  

Gets the value for the BuddyCursor property.

  function GetBuddyHint;

  

Gets the value for the BuddyHint property.

  function GetBuddyWidth;

  

Gets the value for the BuddyWidth property.

  function GetBuddyVisible;

  

Gets the Visible property for the Buddy control.

  procedure SetBuddyCaption();

  

Sets the Caption used in the Buddy property.

  procedure SetBuddyCursor();

  

Sets the cursor shape used in the Buddy property.

  procedure SetBuddyHint();

  

Sets the Hint displayed for the Buddy property.

  procedure SetBuddyWidth();

  

Sets the Width used for the Buddy property.

  procedure SetBuddyVisible();

  

Sets the value for the Visible property in the Buddy control.

  procedure BuddyClick; virtual;

  

Performs actions needed when the Buddy control is clicked.

  procedure DoEnter; override;

  

Performs actions needed when the control is entered.

  procedure EditChange; virtual;

  

Signals the OnEditChange event handler, when assigned.

  procedure EditClick; virtual;

  

Signals the internal OnEditClick event handler, when assigned.

  procedure EditContextPopup(); virtual;

  

Signals the OnContextPopup event handler (when assigned).

  procedure EditDblClick; virtual;

  

Signals the OnDblClick event handler (when assigned).

  procedure EditDragDrop(); virtual;

  

Signals the OnDragDrop event handler (when assigned).

  procedure EditDragOver(); virtual;

  

Signals the OnDragOver event handler (when assigned).

  procedure EditEditingDone; virtual;

  

Signals the OnEditEditingDone event handler (when assigned).

  procedure EditEndDrag(); virtual;

  

Signals the OnEditEndDrag event handler (when assigned).

  procedure EditEnter; virtual;

  

Signals the OnEditEnter event handler (when assigned).

  procedure EditExit; virtual;

  

Signals the OnEditExit event handler (when assigned).

  procedure EditKeyDown(); virtual;

  

Signals the OnEditKeyDown event handler (when assigned).

  procedure EditKeyPress(); virtual;

  

Signals the OnEditKeyPress event handler (when assigned).

  procedure EditKeyUp(); virtual;

  

Signals the OnEditKeyUp event handler (when assigned).

  procedure EditMouseDown(); virtual;

  

Signals the OnEditMouseDown event handler (when assigned).

  procedure EditMouseUp(); virtual;

  

Signals the OnEditMouseUp event handler (when assigned).

  procedure EditMouseEnter; virtual;

  

Signals the FOnEditMouseEnter event handler (when assigned).

  procedure EditMouseLeave; virtual;

  

Signals the OnEditMouseLeave event handler (when assigned).

  procedure EditMouseMove(); virtual;

  

Signals the OnEditMouseMove event handler (when assigned).

  procedure EditMouseWheel();

  

Signals the OnEditMouseWheel event handler (when assigned).

  procedure EditMouseWheelUp(); virtual;

  

Signals the OnEditMouseWheelUp event handler (when assigned).

  procedure EditMouseWheelDown(); virtual;

  

Signals the OnEditMouseWheelDown event handler (when assigned).

  procedure EditUtf8KeyPress(); virtual;

  

Signals the OnEditUtf8KeyPress event handler (when assigned).

  procedure EditStartDrag(); virtual;

  

Signals the OnEditStartDrag event handler (when assigned).

  procedure UpdateSpacing;

  

Updates border spacing in BaseEditor for the Layout or visibility of the Buddy control.

  procedure CheckCursor;

  

Forwards a CheckCursor method call to the BaseEditor for the control.

  procedure CMParentColorChanged(); message;

  

Handles the control message received when the ParentColor property is changed.

  function EditCanModify; virtual;

  

Indicates if BaseEditor can be modified.

  procedure GetSel();

  

Gets the offsets for the current text selection in the control.

  function GetSpacing; virtual;

  

Gets the value for the Spacing property.

  procedure SetSel();

  

Sets the current text selection in the control.

  procedure Loaded; override;

  

Performs actions when the control has finished loading in the LCL streaming mechanism.

  procedure Reset; virtual;

  

Forwards a Reset method call to the BaseEditor in the control.

  procedure SetAutoSize(); override;

  

Sets the value for the AutoSize property.

  procedure SetColor();

  

Sets the value for the Color property.

  procedure SetCursor(); override;

  

Sets the value for the Cursor property.

  procedure ShouldAutoAdjust(); override;

  

Indicates if the height or width is affected during auto-adjust.

  property AutoSelect: Boolean; [rw]

  

Indicates if the text in the control is automatically selected when focus is received.

  property AutoSelected: Boolean; [rw]

  

Indicates if the current text selection was performed automatically.

  property Buddy: TControl; [r]

  

Represents the associated TControl instance in the grouped edit control.

  property BuddyCaption: TCaption; [rw]

  

Caption used for the Buddy control.

  property BuddyCursor: TCursor; [rw]

  

Cursor shape used for the Buddy control.

  property BuddyHint: TTranslateString; [rw]

  

Hint displayed for the Buddy control.

  property BuddyWidth: Integer; [rw]

  

Width for the Buddy control.

  property DirectInput: Boolean; [rw]

  

Indicates if text can be entered directly into the BaseEditor control.

  property BaseEditor: TGEEdit; [r]

  

Represents the control used as the editor for the value in the grouped edit control.

  property EditMask: string; [rw]

  

Contains the masking characters used in the editor for the control.

  property EditText: string; [rw]

  

Contains the value entered in the control including masking characters.

  property FocusOnBuddyClick: Boolean; [rw]

  

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

  property IsMasked: Boolean; [r]

  

Indicates if an edit mask is in use in the BaseEditor in the grouped edit control.

  property Layout: TLeftRight; [rw]

  

Controls the alignment of the edit control and its associate.

  property Spacing: Integer; [rw]

  

Spacing used between the BaseEditor and the Buddy controls.

  property OnBuddyClick: TNotifyEvent; [rw]

  

Event handler signalled when the Buddy control is clicked.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure SetFocus; override;

  

Sets the focus to the editor in the control.

  function Focused; override;

  

Performs actions needed when the control receives focus.

  procedure Clear;

  

Removes the text content in the control.

  procedure ClearSelection; virtual;

  

Clears the content for the current selection in the control.

  procedure CopyToClipboard; virtual;

  

Copies content in the control to the clipboard.

  procedure CutToClipboard; virtual;

  

Copies content in the control to the clipboard, and removes it from the control.

  procedure PasteFromClipboard; virtual;

  

Pastes content into the control from the clipboard.

  procedure SelectAll;

  

Selects all of the content in the control.

  procedure Undo; virtual;

  

Reverses the last edit performed on the control value.

  procedure ValidateEdit; virtual;

  

Performs actions needed to validate the value for the control.

  property Autosize: Boolean;

  

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

  property AutoSizeHeightIsEditHeight: Boolean; [rw]

  

Indicates if the height for BaseEditor is used as the height for the control when autosizing.

  property Alignment: TAlignment; [rw]

  

Indicates the text alignment used for the control value.

  property CanUndo: Boolean; [r]

  

Indicates if the Undo method can used to revert changes to the control value.

  property CaretPos: TPoint; [rw]

  

Position of the editing caret in the control.

  property CharCase: TEditCharCase; [rw]

  

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

  property Color: TColor; [rws]

  

Background color for the BaseEdit in the control.

  property ParentColor: Boolean; [rw]

  

Indicates if the color in the Parent control is used.

  property EchoMode: TEchoMode; [rw]

  

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

  property HideSelection: Boolean; [rw]

  

Hides the current text selection in the control.

  property MaxLength: Integer; [rw]

  

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

  property Modified: Boolean; [rw]

  

Indicates if the content in the control has been changed.

  property NumbersOnly: Boolean; [rw]

  

Indicates that only numbers can be entered in the control value.

  property PasswordChar: Char; [rw]

  

Contains the character displayed when entering a password value.

  property PopupMenu: TPopupMenu; [rw]

  

PopupMenu for the control.

  property ReadOnly: Boolean; [rw]

  

Indicates if value in the control cannot be changed.

  property SelLength: Integer; [rw]

  

Number of characters in the current selection for the control.

  property SelStart: Integer; [rw]

  

Starting position for the current selection in the control.

  property SelText: string; [rw]

  

Returns the selected text in the control.

  property TabStop: Boolean; [rw]

  

Indicates if the control can be reached using Tab navigation.

  property Text: TCaption;

  

The character string associated with the control.

  property TextHint: TTranslateString; [rw]

  

Contains the hint text displayed for the grouped edit control.

  property OnChange: TNotifyEvent; [rw]

  

Event handler signalled when the value for the control is changed.

  property OnClick: TNotifyEvent; [rw]

  

Notification handler for mouse clicks.

  property OnContextPopup: TContextPopupEvent; [rw]

  

Invoked when a context-sensitive pop-up menu is requested.

  property OnDblClick: TNotifyEvent; [rw]

  

Event Handler for double mouse clicks.

  property OnDragDrop: TDragDropEvent; [rw]

  

This handler determines the action on an drop onto this control, in a drag-drop operation.

  property OnDragOver: TDragOverEvent; [rw]

  

Event handler for a control being dragged over this control.

  property OnEditingDone: TNotifyEvent; [rw]

  

Event handler signalled when editing is done.

  property OnEndDrag: TEndDragEvent; [rw]

  

Notification handler for the end of a dragging operation.

  property OnEnter: TNotifyEvent; [rw]

  

Handler for control receiving the focus.

  property OnExit: TNotifyEvent; [rw]

  

Handler for control loosing the focus; This is a good place for checking the finished user input.

  property OnMouseDown: TMouseEvent; [rw]

  

Event handler for mouse button going down.

  property OnKeyPress: TKeyPressEvent; [rw]

  

Handler for a character entered by the user.

  property OnKeyDown: TKeyEvent; [rw]

  

Handler for keyboard key pressed.

  property OnKeyUp: TKeyEvent; [rw]

  

Handler for keyboard key released.

  property OnMouseEnter: TNotifyEvent; [rw]

  

Event handler for mouse entering the area of the control.

  property OnMouseLeave: TNotifyEvent; [rw]

  

Event handler for mouse leaving the area of the control.

  property OnMouseMove: TMouseMoveEvent; [rw]

  

Event handler for mouse movement within the control.

  property OnMouseWheel: TMouseWheelEvent; [rw]

  

Event handler for mouse wheel turned.

  property OnMouseWheelUp: TMouseWheelUpDownEvent; [rw]

  

Event handler for upward movement of the mouse wheel.

  property OnMouseWheelDown: TMouseWheelUpDownEvent; [rw]

  

Event handler for downward movement of mouse wheel.

  property OnMouseUp: TMouseEvent; [rw]

  

Event handler for mouse button going up.

  property OnStartDrag: TStartDragEvent; [rw]

  

Event handler for the start of a dragging operation.

  property OnUtf8KeyPress: TUTF8KeyPressEvent; [rw]

  

Event handler signalled for UTF-8 key press events.

end;

Inheritance

TCustomAbstractGroupedEdit

  

Implements a grouped edit control.

|

TCustomControl

  

The base class for windowed controls which paint themselves.

|

TWinControl

  

The base class for controls which can contain other (child) controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components which have an associated widget.

|

TComponent

?

TObject

Description

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 Aligment 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.

See also

TCustomAbstractGroupedEdit.BaseEditor

  

Represents the control used as the editor for the value in the grouped edit control.

TCustomAbstractGroupedEdit.Buddy

  

Represents the associated TControl instance in the grouped edit control.

TGEEdit

  

Implements the edit control used in TCustomAbstractGroupedEdit.

TCustomControl

  

The base class for windowed controls which paint themselves.

TControl

  

The base class for visible controls.

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