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

TToolBar.AlignControls

Performs actions to align the tool bar buttons in the specified rectangle.

Declaration

Source position: comctrls.pp line 2325

protected procedure TToolBar.AlignControls(

  AControl: TControl;

  var RemainingClientRect: TRect

); override;

Arguments

AControl

  

Not used in the overridden method

RemainingClientRect

  

Rectangle with the bounds where the tool bar and its buttons are aligned.

Description

AlignControls is an overridden method in TToolBar and re-implements the method from the ancestor class. It does not call the inherited method.

No actions are performed in the method when tbfPlacingControls has already been included in the flags for the tool bar. This indicates that AlignControls has already been called, but not yet completed.

DisableAlign is called to prevent automatic alignment while the method is active. WrapButtons is called to position the buttons and controls in RemainingClientRect using the setting in Wrapable and the value from IsVertical. EnableAlign is called to re-enable alignment when the buttons have been positioned.

tbfPlacingControls is removed from the tool bar flags prior to exiting from the method.

See also

TToolBar.IsVertical

  

Indicates if the tool bar is oriented to display buttons and controls vertically.

TToolBar.Wrapable

  

Controls wrapping of tool buttons to the next row when they are too long for the orientation on the tool bar.

TToolBar.WrapButtons

  

Adjusts tool button sizes and positions, and handles wrapping to new rows or columns.

TWinControl.AlignControls

  

Repositions and resizes the control and child controls.


Version 3.2 Generated 2024-02-25 Home