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

# TToggleBox

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

TToggle Box : a labelled box capable of being checked or unchecked

## Declaration

Source position: stdctrls.pp line 1282

`type TToggleBox = class(TCustomCheckBox)`
`class procedure WSRegisterClass; override;` |  | WSRegisterClass - Register this Class for the current Widget Set
`protected`
`procedure CreateParams(); override;`
`public`
`constructor Create(); override;` |  | Create - constructor for TToggleBox: calls inherited Create then initialises style and makes autosize False
`published`
`property AllowGrayed;` |  | Determines whether the check box can be in a "grayed" state.
`property Anchors;` |  | The set of anchor definitions for this control
`property AutoSize;` |  | Whether auto-size is to be used
`property BorderSpacing;` |  | Determines the border spacing for this control
`property Caption;` |  | Caption - the text-string appearing on the Control, usually used to identify its function
`property Checked;` |  | Checked - whether this button has been checked, which signifies selection
`property DragCursor;` |  | DragCursor - the style of cursor to be used during the Drag process
`property DragKind;` |  | DragKind - what sort of dragging? Drag or Dock
`property DragMode;` |  | DragMode - whether manual or automatic
`property Enabled;` |  | Whether the control is Enabled (read/write). If not, it usually appears 'greyed-out'
`property Hint;` |  | Hint - a small informative pop-up box that appears when the mouse 'hovers' over a control
`property OnChange;` |  | OnChange - event handler for any change in properties of the control
`property OnClick;` |  | Event Handler for mouse click
`property OnDragDrop;` |  | Event handler for the drop of a control onto this control.
`property OnDragOver;` |  | Event handler for the case when a control is dragged over another control
`property OnEndDrag;` |  | Event handler for the end of a dragging process
`property OnEnter;` |  | OnEnter - event handler for when the mouse enters the control, and the control receives focus
`property OnExit;` |  | OnExit - event handler for when the mouse leaves the control and it loses focus
`property OnMouseDown;` |  | Event handler for when a mouse button is pressed down
`property OnMouseEnter;`
`property OnMouseLeave;`
`property OnMouseMove;` |  | Event handler for mouse movement within the current control
`property OnMouseUp;` |  | Event handler for when the mouse button is released, ie "up"
`property OnStartDrag;` |  | Event handler for start of dragging operation
`property ParentShowHint;` |  | ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true
`property PopupMenu;` |  | PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control
`property ShowHint;` |  | Flag to determine: Is hint to be displayed for this control?
`property State;` |  | Indicates whether the check box is checked (selected), unchecked (deselected) or grayed.
`property TabOrder;` |  | The place this control occupies in the list of tabs
`property TabStop;` |  | Is the control in the sequence of controls accessed by successive presses of the Tab key?
`property Visible;` |  | Visible - can the control be seen?
`end;`

## Inheritance

`TToggleBox` |  | TToggle Box : a labelled box capable of being checked or unchecked
`TCustomCheckBox` |  | TCustomCheckBox is the ancestor of all check-box components.
`TButtonControl` |  | TButtonControl : ancestor class for several Button (including Radio Button) and Check Box classes
`TWinControl`
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## Description

TToggle Box : a labelled box capable of being checked (when it becomes recessed) or unchecked (when it is raised).

The Application Programmer is responsible for ensuring that the OnClick event handler recognises the State of the box, takes the appropriate Action and places the State into the next appropriate value

## See also

HowToUseStdCtrls |  | How to use StdCtrls, ComCtrls or ExtCtrls

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