Skip to main content

GetBarManagerByForm, TdxBars.Items, TdxBar.DockingStyle, TdxBar.Caption Example

This example requires a button and a toolbar with its caption set to ‘ToolbarCaption’. After pressing this button, the toolbar’s DockingStyle property is changed and the toolbar floats.

procedure TForm1.Button1Click(Sender: TObject);
var
  ABarManager: TdxBarManager;
  ABar: TdxBar;
begin
  ABarManager := GetBarManagerByForm(Form1);
  ABar := ABarManager.BarByCaption('ToolbarCaption');
  if ABar <> nil then
    ABar.DockingStyle := dsNone;
end;