Vcl.ComCtrls.TToolButton.SetBounds
Delphi
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
C++
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TToolButton |
Description
Changes the position and size of the button in a single operation.
Call SetBounds to set the Left, Top, Width, and Height properties at once. By calling SetBounds, you guard against a paint operation occurring after one property is set and before the next, which can cause screen flicker.
SetBounds also provides the underlying implementation for setting these four properties.
As implemented in TToolButton, SetBounds ensures that the new position and dimensions of the tool button fit within the constraints imposed by its parent toolbar, and cause the parent toolbar to resize, if necessary, to accommodate the changes in the tool button.