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.
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;
// ...
void __fastcall TForm1::dxBarManagerBarClose(TdxBarManager *Sender, TdxBar *ABar)
{
if (ABar->DockingStyle == dsNone)
{
ABar->DockingStyle = ABar->DockedDockingStyle;
Abar->Visible = true;
}
}