TdxBarManager.OnDocking Event
Occurs when an end-user changes a toolbar’s position.
Declaration
property OnDocking: TdxBarCanDockingEvent read; write;
Remarks
Handle the OnDocking event to perform specific actions when an end-user changes a toolbar’s position. This event is fired by the DoDocking function. This function initializes the event’s CanDocking parameter. Refer to the description of the DoDocking function to learn about the event’s parameters and the conditions which result in the event firing.
The following code prevents a toolbar which represents a main menu from docking to any side of a form except for its top:
procedure TForm1.dxBarManager1Docking(Sender: TdxBar; Style: TdxBarDockingStyle; var CanDocking: Boolean);
begin
if Sender = GetBarManagerByForm(Self).MainMenuBar then
if Style <> dsTop then
CanDocking := False;
end;
See Also