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

TToolBar.WrapButtons

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

Declaration

Source position: comctrls.pp line 2316

protected function TToolBar.WrapButtons(

  UseSize: Integer;

  out NewWidth: Integer;

  out NewHeight: Integer;

  Simulate: Boolean

):Boolean;

Description

WrapButtons is a Boolean function used to resize and position buttons on the tool bar. WrapButtons positions buttons from left to right in the client display area, and repositions any child control with its Align property set to clNone.

When Simulate is True, the child control sizes and positions are calculated but not applied to the tool bar.

Set Wrapable to text to allow a new row or column to be created when the cumulative button width is larger than the width for the tool bar. Or set the Wrap property in a specific tool button to True to force it and subsequent controls onto a new row or column.

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