[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Sets the width and height for Buttons on the control to the specified values.
Source position: comctrls.pp line 2345
public procedure TToolBar.SetButtonSize( |
NewButtonWidth: Integer; |
NewButtonHeight: Integer |
); |
NewButtonWidth |
|
New value for the ButtonWidth property. |
NewButtonHeight |
|
New value for the ButtonHeight property. |
SetButtonSize is a convenience method used to assign values for the ButtonWidth and ButtonHeight properties in a single method call. It is called when a new value is assigned to the ButtonWidth or ButtonHeight properties.
For example:
AToolbar.SetButtonSize(32, 30);
is equivalent to:
AToolbar.ButtonWidth := 32; AToolbar.ButtonHeight := 30;
The existing value in the property is kept when it is the same as the new value. No actions are performed in the method when neither value has been changed, or when BeginUpdate has already been called.
SetButtonSize visits each of the Buttons on the control to apply the changed values to the corresponding TToolButton properties. The button might not be updated if any of the following conditions are found.
For button width:
For button height:
SetButtonSize calls the SetBounds method in each tool bar button to apply the values in NewButtonWidth and NewButtonHeight.
|
Contains the width for buttons on the tool bar control. |
|
|
Contains the height for buttons on the tool bar control. |
|
|
Lists with the tool buttons on the tool bar. |
Version 3.2 | Generated 2024-02-25 | Home |