Попробуйте проанализировать и применить такой вот "сложный" код: procedure TMainForm.UniFormReady(Sender: TObject); begin // первый параметр может быть больше ToolButtons.Count+1 with UniPanel1 do if TitleVisible then JSInterface.JSCode('var tm=new Ext.util.TextMetrics();'#1'.header.insert('+ (ToolButtons.Count+1).ToString +', {xtype:"tbspacer", width:'#1'.header.title.getWidth()-(tm.getWidth('#1'.getTitle())+10)});'); end;