To reorder controls in ToolBar lazarus / 31-LCL ---------------------------------------------------------------------- asdf · 2011-03-15 18:03 From the attached screenshot, what is the index to sort such controls ? For example, how could I move Save_BitBtn to be the first ? ---------------------------------------------------------------------- fabienwang · 2011-03-15 19:13 humm the only property i see changing is Left. But you can drag and drop buttons from left to right or right to left on the Toolbar in design mode. Order on the Object Inspector does not reflect necessarily the real order of buttons ---------------------------------------------------------------------- asdf · 2011-03-15 19:27 I'd like to take the use of ... for n:= 0 to toolbar1.ControlCount-1 do begin StringGrid1.Columns[n].Title.Caption:=Toolbar1.Controls[n].Caption; But it gave a queue as shown in the Object Inspector, not like in design window  . ---------------------------------------------------------------------- garlar27 · 2011-03-15 20:18 AFAIR the order is given by it's Creation Order. ---------------------------------------------------------------------- Blaazen · 2011-03-15 22:23 I used TToolBar to design user-configurable ToolBar. ToolBar has several groups and each group has several ToolButtons: 1-st is FileGroup: (New File, Open File, Save File, Close File) 2-nd is EditGroup: (Undo, Redo) etc... User can configure it at runtime (which group will be visible or invisible). I had to MANUALLY edit *.lfm file, i.e. ToolButtons of TToolBar in *.lfm file are NOT sorted by their creation order but they are sorted from Left to Right now. ---------------------------------------------------------------------- asdf · 2011-03-16 03:59 Quote from: garlar27 on March 15, 2011, 09:18:19 pmAFAIR the order is given by it's Creation Order. Thank you, it is up to creation order. I tried moving them in the design window but the order in ... for n:= 0 to toolbar1.ControlCount-1 do begin StringGrid1.Columns[n].Title.Caption:=Toolbar1.Controls[n].Caption; is still as shown in the Objects Inspector window. ---------------------------------------------------------------------- garlar27 · 2011-03-16 17:50 Quote from: asdf on March 16, 2011, 04:59:17 amQuote from: garlar27 on March 15, 2011, 09:18:19 pmAFAIR the order is given by it's Creation Order. Thank you, it is up to creation order. I tried moving them in the design window but the order in ... for n:= 0 to toolbar1.ControlCount-1 do begin StringGrid1.Columns[n].Title.Caption:=Toolbar1.Controls[n].Caption; is still as shown in the Objects Inspector window. The only thing I can think of (instead of editing the *.lfm) is:    1. Create another Toolbar.    2. Start changing the Toolbuttons from toolbar1 to toolbarTemp (right click the toolbutton and select "Change Parent/ToolBarTemp").    3. Then move the ToolButtons again to ToolBar1 with the desired order (first the first one, second the second one, and so forth). then you can create a temporary Panel to do the same with other controls. Anyway I don't see what's the point of doing this. ---------------------------------------------------------------------- asdf · 2011-03-17 02:48 Quote from: garlar27 on March 16, 2011, 06:50:53 pmAnyway I don't see what's the point of doing this. for n:= 0 to toolbar1.ControlCount-1 do begin StringGrid1.Columns[n].Title.Caption:=Toolbar1.Controls[n].Caption; gave the order as shown in the Objects Inspector window, not as shown in the design view. Quote from: garlar27 on March 16, 2011, 06:50:53 pm   1. Create another Toolbar. Thank you .