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

# TToolBar

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

## Declaration

Source position: comctrls.pp line 1663

`type TToolBar = class(TToolWindow)`
``
`class procedure WSRegisterClass; override;` |  | WSRegisterClass - Register this Class for the current Widget Set
`protected`
`procedure AdjustClientRect(); override;` |  | AdjustClientRect - method for adjusting the size and position of the client control
`protected`
`class function GetControlClassDefaultSize; override;` |  | GetControlClassDefaultSize - returns its own defaults, overriding the inherited values
`protected`
`procedure DoAutoSize; override;`
`procedure CalculatePreferredSize(); override;` |  | CalculatePreferredSize - find default/preferred height and width
`function CheckMenuDropdown(); virtual;` |  | CheckMenuDropdown - returns True if there is a checked dropdown menu
`procedure ClickButton(); virtual;` |  | ClickButton - software emulation of the OnClick event
`procedure CreateWnd; override;` |  | CreateWnd - Creates the Window
`procedure ControlsAligned; override;` |  | ControlsAligned - called by AlignControls after aligning controls
`function FindButtonFromAccel();` |  | FindButtonFromAccel - returns the Button corresponding to the specified accelerator key
`procedure FontChanged(); override;` |  | FontChanged - method to cope with change in font
`procedure Loaded; override;` |  | Loaded makes a number of checks, using client size if specified, and copying appropriate flags, fonts, text etc, makes list of child controls to notify them of any changes, then calls inherited Loaded
`procedure Notification(); override;` |  | Notification - calls inherited Notification, then takes action depending on Operation
`procedure RepositionButton();` |  | RepositionButton - method for re-positioning a button
`procedure RepositionButtons();` |  | RepositionButtons - method for re-positioning several buttons
`function WrapButtons();` |  | WrapButtons - returns True if changing to NewHeight and NewWidth causes wrapping of buttons
`public`
`constructor Create(); override;` |  | Create - constructor for TToolBar: calls inherited Create and sets many formatting and size defaults
`destructor Destroy; override;` |  | Destroy - destructor for TToolBar: frees buttons and links then calls inherited Destroy
`procedure FlipChildren(); override;` |  | FlipChildren - reverse the order of the child components
`procedure BeginUpdate; virtual;` |  | BeginUpdate - starts the update process
`procedure EndUpdate; virtual;` |  | EndUpdate - finishes the update process
`function GetEnumerator;`
`procedure Paint; override;` |  | The default paint handler for the class
`procedure SetButtonSize();` |  | SetButtonSize - stores new values for height and width
`function CanFocus; override;` |  | CanFocus - is the current window allowed to receive focus?
`property ButtonCount: Integer; [r]` |  | ButtonCount - the number of buttons on the ToolBar
`property Buttons: TToolButton; [r]` |  | Lists the tool buttons (TToolButton) in the toolbar.
`property ButtonList: TList; [r]` |  | ButtonList - the list of Buttons (as a TList)
`property RowCount: Integer; [r]` |  | RowCount - the number of Rows of Buttons
`published`
`property Align;` |  | Used to align the control to the top, bottom, left or right of its client.
`property Anchors;`
`property AutoSize;` |  | Whether auto-size is to be used
`property BorderSpacing;` |  | Determines the border spacing for this control
`property BorderWidth;` |  | Property to determine width of the window's border
`property ButtonHeight: Integer; [rw]` |  | ButtonHeight - the height of the buttons
`property ButtonWidth: Integer; [rw]` |  | ButtonWidth - the width of the buttons
`property Caption;` |  | Caption - the text-string appearing on the Control, usually used to identify its function
`property ChildSizing;` |  | Definitions how any child control is to be sized (read/write).
`property Constraints;` |  | Determine Constraints (max and min height and width) for this control
`property Color;` |  | Determine the colour for the current control
`property DisabledImages: TCustomImageList; [rw]` |  | The Images on the Image List that are NOT selected for display
`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 EdgeBorders;` |  | EdgeBorders - which borders form th eedge
`property EdgeInner;` |  | EdgeInner - this toolbar has an inner edge
`property EdgeOuter;` |  | EdgeOuter - this toolbar has an outer edge
`property Enabled;` |  | Whether the control is Enabled (read/write). If not, it usually appears 'greyed-out'
`property Flat: Boolean; [rw]` |  | Should the toolbuttons be displayed Flat (rather than in relief)? Default false
`property Font;` |  | The font to be used for text in this control (read/write).
`property Height;` |  | Height - the vertical dimension of the control
`property HotImages: TCustomImageList; [rw]` |  | The Images on the Image list that are selected for display
`property Images: TCustomImageList; [rw]` |  | The Images to be displayed on the buttons
`property Indent: Integer; [rw]` |  | Indent - the amount by which the buttons should be indented Default is 1
`property List: Boolean; [rw]` |  | Should the contents of the toolbar be displayed as a List? Default false
`property ParentColor;` |  | ParentColor - should the control have the same colour as the parent? Default is true
`property ParentFont;` |  | ParentFont - should the control use the same font as the parent? Default is true
`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 ShowCaptions: Boolean; [rw]` |  | ShowCaptions - should the captions be shown for the buttons? (Default False)
`property ShowHint;` |  | Flag to determine: Is hint to be displayed for this control?
`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 Transparent: Boolean; [rw]` |  | Is the ToolBar to be Transparent? Default False
`property Visible;` |  | Visible - can the control be seen?
`property Wrapable: Boolean; [rw]` |  | Wrapable - enables wrapping buttons to the next row if there are too many for the current row
`property OnClick;` |  | Event Handler for mouse click
`property OnContextPopup;` |  | Event handler to supply information when a context-sensitive pop-up menu is required
`property OnDblClick;` |  | Event Handle for mouse double-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 OnMouseMove;` |  | Event handler for mouse movement within the current control
`property OnMouseUp;` |  | Event handler for when the mouse button is released, ie "up"
`property OnMouseEnter;` |  | Event handler for when the mouse enters the area of the current control
`property OnMouseLeave;` |  | Event handler for when the mouse leaves the area of the current control
`property OnResize;` |  | Event Handler for resize of control
`property OnChangeBounds;` |  | Event handler for a change in bounds of the control
`property OnStartDrag;` |  | Event handler for start of dragging operation
`end;`

## Inheritance

`TToolBar`
`TToolWindow`
?
`TObject`

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