RC: Toolbar and align of elements

Hello,

porting a project from 0.8 to RC, I see that the behaviour of aligning elements have changed.

In 0.8 the below code give me this result:

in RC the toolbar look like this:

{ view:"toolbar", type:"MainBar", id:"basketToolbar", elements: [ { view:"label", label: "Warenkorb", align:"left", id: "basketLabel", css:"areaExpanded", click: function (a,b,obj){toggleBasket(obj);} }, { view:"imagebutton", src: '../images/theme/new.png', align:"left", click: "clearBasket" }, { view:"imagebutton", src: '../images/theme/open.png', align:"left", click: "loadBasket" }, { view:"imagebutton", src: '../images/theme/save.png', align:"left", click: "saveBasket" }, { view:"imagebutton", src: '../images/theme/zip.png', align:"left", click: "basketZipDownload(\"basketView\")" }, { view:"imagebutton", src: '../images/theme/mail.png', align:"left", click: "basketZipSend(\"basketView\")" }, { view:"imagebutton", src: '../images/theme/arrow_up.png', align:"right", click: "basketViewUp" }, { view:"imagebutton", src: '../images/theme/arrow_down.png', align:"right", width: 50, click: "basketViewDown" } ] }

Assigning widths to the elements helps, but I guess that’n not the desired result.

Thanks in advance
Horst Muerdter
CrossData-Tools

Hello,

toolbar inherits layout. Therefore, its width is divided equally between the cells. You need to specify the width for cells (items):

elements: [ { view:"label", width:170, label: "Warenkorb", align:"left", id: "basketLabel", css:"areaExpanded", click: function (a,b,obj){toggleBasket(obj);} }, { view:"imagebutton", width:60, src: '../images/theme/new.png', align:"left", click: "clearBasket" }, { view:"imagebutton", width:60, src: '../images/theme/open.png', align:"left", click: "loadBasket" }, { view:"imagebutton", width:60, src: '../images/theme/save.png', align:"left", click: "saveBasket" }, { view:"imagebutton", width:60, src: '../images/theme/zip.png', align:"left", click: "basketZipDownload(\"basketView\")" }, { view:"imagebutton", width:60, src: '../images/theme/mail.png', align:"left", click: "basketZipSend(\"basketView\")" }, { view:"label", label:"" }, { view:"imagebutton", width:30, src: '../images/theme/arrow_up.png', align:"right", click: "basketViewUp" }, { view:"imagebutton", width:30, src: '../images/theme/arrow_down.png', align:"right", width: 50, click: "basketViewDown" } ]

Thanks Alexandra,

the

{ view:"label", label:"" },

did the trick :wink:

Thanks
Horst