How to get titles in collapsed panels for ‘border’ layout.
March 15th, 2008 Jay Garcia Posted in EXT Examples, EXTJS, Ext Extensions | 5 Comments »
In response to this thread at the Ext forums, I initially created a simple override (Click here to see it action) to the Ext Border Layout. The solution was a quick one hour deal with no magic or gloss. There was some posts soon there after that requested more functionality for this override. These requests include:
- images for the east/west regions (for CBC)
- ability to re-use the original title
- the freedom to insert what ever element object or HTML fragment the end developer desired
- change from override to extension.
So, I’ve rolled up all of these requests into one Ext.ux.TDGi.BorderLayout class. This solution provides all of the freedom flexibility that was requested.
Click here to view a working example of this extension. Click here to download the zip file of the full source and example.
Simple Example:
(FF2.x on OS X)

Actual Example Source:
October 23rd, 2008 at 11:23 am
Thanks Garcia,
it worked really well. However, to show the vertical text for the east and west panels, i used the following code to avoid the images:
collapsedTitle: {
//Just like an Ext.DomHelper config object
element : {
// Required0
tag : ‘div’,
// Required
html : “E<br>a<br>s<br>t<br><br>”,
// Set this if you need to.
style : “margin-left:6px;color: #003366;font-weight:bold;line-height:9px;”
}
}
November 13th, 2008 at 10:17 am
Thanks Kadirisani.
I will look to add this to the code base
July 10th, 2009 at 1:37 am
Hi,
I have tried your code in my application. The collapsed title is working fine. But the “titleCollapse” property of the panel is not working. The collapsed panel is expanding and two titles are disaplyed when I click the mouse on the title bar of the collapsible panel (I have set “titleCollapse: false” for the panel). I wish to expand the panel only by clciking on the icon. Is there any workaround for this?
July 20th, 2009 at 6:12 am
Are you trying this with Ext JS 3.0?
September 22nd, 2009 at 1:36 pm
Hi, Jay. Do you have updated version of your “borderLayout” library for Ext 3.x? I am not sure whether your original implementation is fully compatible with Ext 3.x…
Another problem i would like to point out looking for your help… If title has a long string (wraps over to two lines, for example), when the panel gets collapsed the “restore” button disappears from the title bar. This problem exists in FireFox, but works fine for IE. Basically, the button is rendered under the title bar (since there are two+ lines of text) and it’s not visible. Is it possible to fix this problem?