PDA

View Full Version : BorderLayout



wos
22 Nov 2006, 10:41 PM
i need some help here, i try to play around with the sample code (Complex layout) from layouts. So what i did is trying to add multiple of Panels into 'center', however it only show up to certain of number of panels (depend on the title lenght), the rest is out from the screen, is there anything i could do? or anything i could refer to? , please advise, thanks.

jack.slocum
23 Nov 2006, 3:34 AM
There are 3 config options which control tab auto resizing.

resizeTabs true/false
minTabWidth : 45 (default)
preferredTabWidth : 150 (default)

These config options go on a region.

wos
26 Nov 2006, 7:49 PM
how do i attach onshow event on tabpanel?

for example when i click on TAB1, then it load different contain to 'WEST region', and it do the same thing when i click on others tab?

wos
27 Nov 2006, 2:15 AM
i try this, but still unable to get it work




function test123() {
alert('got it');
}

var tabPanel = layout.getRegion('center').getTabs('center1');
tabPanel.addListener('onmouseover', test123());

Animal
27 Nov 2006, 2:48 AM
No such event as "onmouseover"

wos
27 Nov 2006, 2:50 AM
no?? how about onclick??


tabPanel.addListener('onclick', test123());

am i doing the right way??

i try this,



tabPanel.activate = function doingsth() {
}


but it seem i have override that function and unable to call the function out.

Animal
27 Nov 2006, 4:29 AM
no?? how about onclick??


tabPanel.addListener('onclick', test123());

am i doing the right way??

i try this,



tabPanel.activate = function doingsth() {
}


but it seem i have override that function and unable to call the function out.

No such event as "on" anything!

jack.slocum
27 Nov 2006, 5:53 AM
What Animal is saying it to lose the "on". It's "click", not "onclick".

The event in a region for when a panel is shown is "panelactivated". Check out the docs for LayoutRegion, all the events are documented there.

wos
27 Nov 2006, 7:04 AM
sorry Animal, noob here :cry: , ok will try that later , thanks for the help

wos
27 Nov 2006, 5:29 PM
thanks guys, finally i got it working :P



layout.getRegion('center').addListener('panelactivated', test123);