Skip to main content

How to Dock a Floating Toolbar to its Previous Position Upon Closing

To implement this feature, you must handle a bar manager’s OnBarClose event as shown in the following code example.

// ...
procedure TMainForm.dxBarManagerBarClose(Sender: TdxBarManager; ABar: TdxBar);
begin
  if ABar.DockingStyle = dsNone then
  begin
    ABar.DockingStyle := ABar.DockedDockingStyle;
    ABar.Visible := True;
  end;
end;