PDA

View Full Version : help with button.js from ext samples



beterraba
28 Jun 2010, 8:02 AM
Hi all,

I've created a viewport with main regions which is ok and I also inserted my banner on header (north region).
So I'd wanted to add a logout button, but not a panel.

I found the (new) example from ext samples at
http://www.sencha.com/deploy/dev/examples/button/buttons.html
Ok, that's most like from what I want.
But how do I make it work?

I appreciate ANY help!
Regards

beterraba
5 Jul 2010, 11:56 AM
up..

gevik
5 Jul 2010, 1:50 PM
Study the code below. Perhaps it helps.



new Ext.Viewport({
renderTo:Ext.getBody(),
layout:'border',
items:[
new Ext.Toolbar({
region:'north',
height:28,
items:[
'->',
new Ext.Button({
text:'Logout',
listeners:
{
click:function()
{
Ext.Msg.alert('Sample',this.text + ' click');
}
}
})
]
}),
new Ext.Panel({
region:'east',
split:true,
width:200,
title:'East'
}),
new Ext.Panel({
region:'center',
title:'Center'

})
]
});

beterraba
7 Jul 2010, 10:06 PM
Thank you gevik.
You bet I'll study it very carefully!