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

TCustomCheckCombo

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

Base class for a combo-box which displays check boxes for Items in the control.

Declaration

Source position: comboex.pas line 271

type TCustomCheckCombo = class(TCustomComboBox)

protected

  FCheckHighlight: Boolean;

  

Internal member used to to track the highlighting state.

  FCheckSize: TSize;

  

Internal member used to track size adjusts needed for them services.

  FDropped: Boolean;

  

Internal members used to track the state for the drop down in the control.

  FHilightedIndex: Integer;

  

Internal member used to track the item highlighted in the control.

  FHiLiteLeft: Integer;

  

Internal member used to track the left coordinate for the highlight.

  FHiLiteRight: Integer;

  

Internal member used to track the right coordinate for the highlight.

  FNeedMeasure: Boolean;

  

Internal member used to track whether the text height has been calculated for items in the control.

  FRejectDropDown: Boolean;

  

Internal member used to track whether drop down requests should be rejected; i. e. the drop down is already visible.

  FRejectToggleOnSelect: Boolean;

  

Internal member used to track whether the current check box selection can toggle its value; i. e. whether the drop down is visible.

  FRightToLeft: Boolean;

  

Internal member used to track the BiDi status for the control.

  FTextHeight: SmallInt;

  

Internal member used to track the text height for check boxes in the control.

  procedure CMBiDiModeChanged(); message;

  

Performs actions needed when the BiDiMode setting is changed for the control.

  procedure ClearItemStates;

  

Removes all state classes allocated for the check boxes in the control.

  procedure CloseUp; override;

  

Closes the drop down displayed for the control.

  procedure DrawItem(); override;

  

Draws a check box item defined in the combo-box control.

  procedure DropDown; override;

  

Displays the drop down for the combo-box.

  procedure FontChanged(); override;

  

Performs actions needed when the font for the control has been changed.

  procedure InitializeWnd; override;

  

Initializes the window handle for the control.

  procedure InitItemStates;

  

Initializes check box state information for items in the control.

  procedure CheckItemStates;

  

Ensures that check box item state classes have been allocated for items in the control.

  procedure QueueCheckItemStates;

  

Queues an asynchronous call to AsyncCheckItemStates in the Application singleton.

  procedure KeyDown(); override;

  

Handles key down events for the control.

  procedure Loaded; override;

  

Performs actions needed when the component has finished loading from the LCL streaming mechanism.

  procedure MouseLeave; override;

  

Deactivates tracking the highlighted check box when the mouse leaves the control.

  procedure MouseMove(); override;

  

Tracks changes to the mouse position for the highlighted check box in the control.

  procedure SetItemHeight(); override;

  

Sets the value for the ItemHeight property.

  procedure SetItems(); override;

  

Sets the value for the Items property.

  procedure Select; override;

  

Toggles the value for the current item selected in the control.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure AddItem();

  

Adds the specified string (and optional object) to the Items displayed in the control.

  procedure AssignItems();

  

Assigns the content in the specified TStringList to the Items in the control.

  procedure Clear; override;

  

Removes the values stored in the Items property.

  procedure DeleteItem();

  

Deletes the check box at the specified position.

  procedure CheckAll();

  

Sets the state for all check boxes defined in the control meeting the specified criteria.

  procedure Toggle();

  

Toggles the checked state for the check box at the specified position.

  property AllowGrayed: Boolean; [rw]

  

Indicates if check boxes can be drawn in the indeterminate state.

  property Count: Integer; [r]

  

Reflects the number of check boxes defined for the control.

  property Checked []: Boolean; [rw]

  

Provides indexed access to the Boolean value for a check box defined in Items.

  property ItemEnabled []: Boolean; [rw]

  

Provides indexed access to the Boolean enabled value for a check box defined in Items.

  property Objects []: TObject; [rw]

  

Provides indexed access to the Data for a check box defined in Items.

  property State []: TCheckBoxState; [rw]

  

Provides indexed access to the checked State for a check box defined in Items.

  property OnItemChange: TCheckItemChange; [rw]

  

Event handler signalled when the state for a check box in the control is changed.

end;

Inheritance

TCustomCheckCombo

  

Base class for a combo-box which displays check boxes for Items in the control.

|

TCustomComboBox

  

The base class for combo-box components.

|

TWinControl

  

Implements a windowed control 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,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TCustomCheckCombo is a TCustomComboBox descendant which defines the base class for a combo-box which displays check boxes for the Items in the control. It behaves like an ordinary combo-box with a drop-down using a customizable number of visible rows.

TCustomCheckCombo provides additional properties, methods, and events which allow the checked state for values in Items to be specified as either a Boolean or a TCheckBoxState value. An OnItemChange event handler is added to perform custom actions when the Checked value for an item is changed. Convenience methods are included which allow check boxes to be added or deleted, or toggle their value.

TCustomCheckCombo is the ancestor for the TCheckComboBox control.

See also

TCheckComboBox

  

Combo-box control which displays check boxes for the items in the control.

TCustomComboBox

  

The base class for combo-box components.


Version 3.2 Generated 2024-02-25 Home