Question on Delphi (Lazarus)?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
3 views
The form has a TToolBar. It TToolButton buttons.


How can I programmatically, during execution of a program, to move (swap) button on this Toolbar?
by | 3 views

2 Answers

0 like 0 dislike
procedure TForm1.FormCreate(Sender: TObject);
var temp: integer;
begin
temp := ToolButton1.Left;
ToolButton1.Left := ToolButton2.Left;
ToolButton2.Left := ToolButton1.Left;
end;
by
0 like 0 dislike
Horse have a typo, it is necessary to do so:
procedure TForm1.FormCreate(Sender: TObject);
var temp: integer;
begin
temp := ToolButton1.Left;
ToolButton1.Left := ToolButton2.Left;
ToolButton2.Left := temp;
end;
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
7 answers
asked Mar 21, 2019 by agul
0 like 0 dislike
2 answers
asked May 12, 2019 by bogdan_uman
0 like 0 dislike
2 answers
asked Apr 13, 2019 by makklovskiy
110,608 questions
257,186 answers
0 comments
27,924 users