PDA

View Full Version : Anchor a toolbar to the top right, rather than top left...



EXTOmega
11 Oct 2010, 11:00 AM
I have a toolbar that I'm adding to my pages as follows:


var pageTray = new Ext.Toolbar({

renderTo: Ext.getBody(),
width: "50%",
items: [
{
xtype: "tbtext",
text: "Hello!"
},
{
text: "Weehu!"
}
]

});


I'd like to have it so that when the toolbar shrinks to 50% of the containing element (body), that it anchors to the top right rather than the top left of the viewport....

Thanks!

laurentParis
11 Oct 2010, 9:49 PM
var pageTray = new Ext.Toolbar({
renderTo: Ext.getBody(),
style: 'float: right;',
width: "50%",
items: [{
xtype: "tbtext",
text: "Hello!"
},{
text: "Weehu!"
}]
});