1Index: toolbutton.inc 2=================================================================== 3--- toolbutton.inc (revision 20785) 4+++ toolbutton.inc (working copy) 5@@ -853,7 +853,7 @@ 6 FToolBar:=nil; 7 if AParent is TToolBar then 8 begin 9- if Style in [tbsButton,tbsDropDown,tbsCheck] then 10+ if (Style in [tbsButton,tbsDropDown,tbsCheck]) and not AutoSize then 11 NewWidth:=TToolBar(AParent).ButtonWidth 12 else 13 NewWidth:=Width; 14@@ -869,8 +869,13 @@ 15 begin 16 FToolBar:=TToolBar(Parent); 17 i := Index; 18- if i < 0 then 19+ if i < 0 then begin 20+ //move button last 21+ i := FToolBar.ButtonCount - 1; 22+ if i >= 0 then 23+ Left := FToolBar.Buttons[i].Left + FToolBar.Buttons[i].Width; 24 FToolBar.AddButton(Self); 25+ end; 26 UpdateVisibleToolbar; 27 end; 28 //DebugLn(['TToolButton.SetParent A ',Name,' NewIndex=',Index]); 29