PDA

View Full Version : Change width of a collapsed tbar



PranKe01
17 Feb 2010, 3:51 AM
Hi there,

I got a menu placed in the tbar of a Panel. To hide it, I use the collapsible property. That works good, but when it is collapsed and I click on the "collapsed-bar", the menu scrolls down animated with a smaller width. The floating menu got the width of the "collapsed-bar", which is about 10px smaller.
How can I set the width of the floating menu to 100%, like the normal menu?

PranKe01
17 Feb 2010, 12:28 PM
No ideas? I tried to make the x-panel-floating to 100% width, but that didn't worked good.

tobiu
17 Feb 2010, 12:37 PM
hi PranKe01,

i am not sure about this, but in this case i would try to set the hideMode of the container / panel to offsets. the resizing is not triggered on elements that are hidden with display or visibility as far as i know.

what could also help is to call doLayout() on the container after expanding.

kind regards,
tobiu

PranKe01
18 Feb 2010, 12:05 AM
Hi tobiu,

thanks for your answer. I don't know exactly what the hideMode would change, because it is not hidden. Also the Layout is correct - the problem is that the floating Panel has a smaller width. I looked at the generated source and saw, that the width is 10px smaller than it should be and it got a CSS-Style "left: 5px;" (so it's centered). I think, that this values are set anywhere in the code... The question is where and how to change this.
An option to set this in the next version of ExtJS would be good.

Maybe I misunderstood you?

tobiu
18 Feb 2010, 12:57 AM
or maybe i misunderstood you.
if it is always, it sounds like the margins and / or cmargins config.
posting some code could help.

kind regards,
tobiu

PranKe01
18 Feb 2010, 1:41 AM
Here is some code:

var content = new Ext.Panel({
region: 'north',
height: 108,
border: false,
collapsible: true,
hideCollapseTool: true,
title: 'title',
id: 'interfacepanel',
tools: [{
id: 'close',
qtip: 'Close',
handler: logout
}],
tbar: [/* buttongroup menu buttons */]
});

I don't know if it helps... The problem is that the floating Panel has a smaller width, but I want that got 100% width.

Thanks.

PranKe01
20 Feb 2010, 7:12 AM
No ideas so far?

PranKe01
8 Mar 2010, 7:54 AM
Is there no possibility to change that width? Maybe it could be implemented into the next version of Ext?