API:Vcl.ActnMan.TCustomActionBar.CustomAlignInsertBefore

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CustomAlignInsertBefore(C1: TControl; C2: TControl): Boolean; override;

C++

virtual bool __fastcall CustomAlignInsertBefore(Vcl::Controls::TControl* C1, Vcl::Controls::TControl* C2);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.ActnMan.pas
Vcl.ActnMan.hpp
Vcl.ActnMan TCustomActionBar

Description

Returns placement order of custom-aligned child control.

Vcl.ActnMan.TCustomActionBar.CustomAlignInsertBefore inherits from Vcl.Controls.TWinControl.CustomAlignInsertBefore. All content below this line refers to Vcl.Controls.TWinControl.CustomAlignInsertBefore.

Returns placement order of custom-aligned child control.

CustomAlignInsertBefore determines the order in which custom-aligned child controls are placed. The control calls CustomAlignInsertBefore once for each pair of child controls with an Align property of alCustom. CustomAlignInsertBefore returns true if C2 should be presented before C1, and false otherwise.

Once the custom-aligned child controls are sorted, their specific positions are determined by calls to CustomAlignPosition.

CustomAlignInsertBefore triggers the OnAlignInsertBefore event. If this event is defined, CustomAlignInsertBefore returns the value returned by OnAlignInsertBefore. Defining this event allows users to define the order of control alignment without overriding CustomAlignInsertBefore.

As implemented in TWinControl, CustomAlignInsertBefore returns false if OnAlignInsertBefore is not implemented, so the controls are placed in the order they appear in the Controls property.

See Also