var
r : integer;
procedure TForm1.Button1Click(Sender: TObject);
begin
if not ToolBar2.Visible then
begin
ToolBar2.Visible := not ToolBar2.Visible;
ToolBar1.Width := r
end
else
begin
r := ToolBar1.Width;
ToolBar2.Visible := not ToolBar2.Visible;
end;
end;