We help IT Professionals succeed at work.

how to insert a button to toolbar in run time

f15iaf
f15iaf asked
on
how to insert a button to toolbar in run time
Comment
Watch Question

Software Developer
CERTIFIED EXPERT
Commented:
procedure TForm1.Button1Click(Sender: TObject);
 var
   ToolButton : TToolButton;
begin
  ToolButton := TToolButton.Create(ToolBar1);
  ToolButton.Parent:= ToolBar1;
  ToolButton.Visible := True;
  ToolButton.Left:= 200;
  ShowMessage(IntToStr(ToolBar1.ButtonCount));
end;

Explore More ContentExplore courses, solutions, and other research materials related to this topic.