Open GoogleCodeExporter opened 9 years ago
It happens in version GWT-Ext 2.0.4 for the class Panel too :-(
<code>
final Panel pane = new Panel("Title");
panel.setCollapsible(true);
</code>
Original comment by cristesc...@gmail.com
on 29 Aug 2008 at 11:55
Wow! This defect is opened since February 13 and nobody did anything? Come on
!!!
Need a fix here...
Original comment by cristesc...@gmail.com
on 15 Sep 2008 at 12:29
I have a desire similar to the topic starter. A collapsed panel turns obscure,
not
user-friendly...
Please...
Original comment by michiel....@gmail.com
on 15 Sep 2008 at 2:10
I haven't found a way to work around this, so a fix would still be greatly
appreciated.
Original comment by mhutchin...@gmail.com
on 15 Sep 2008 at 2:22
This is not supported by Ext, however there's a user plugin that adds this
functionality.
http://tdg-i.com/30/how-to-get-titles-in-collapsed-panels-for-border-layout
Feel free to integrate it. If yoo'd like to make this extension contribution to
GWT-Ext-UX, let me know and I'll grant you commit privileges.
Original comment by sanjiv.j...@gmail.com
on 15 Sep 2008 at 8:41
Thank you, I will look into that!
In the meanwhile I have changed the BorderLayout to a RowLayout. This way you
do have
a title when collapsed, but no more animations :'(
Added theCollapsingPanel.setTitleCollapse(true) so you can press on the entire
bar
when collapsed to expand and not just on the tiny icon.
Original comment by michiel....@gmail.com
on 16 Sep 2008 at 8:24
I wrote a workaround for this:
p.addListener(new PanelListenerAdapter() {
@Override
public void onCollapse(Panel panel) {
JavaScriptObject jsObj = DOM.getElementById(panel.getId()+"-xcollapsed");
if (jsObj != null) {
JavaScriptObjectHelper.setAttribute(JavaScriptObjectHelper.getAttributeAsElement(jsObj, "firstChild"),"innerHTML"," <div style=\"position: absolute; left: 20px;top:5px;font-weight:bold;\">"+panel.getTitle()+"</div>");
}
}
});
It works in FF and Chrome, but not in IE. IE has a problem with "position:
absolute", I'm still trying do solve this.
This solution will work for north and south panels, for west and east panels
you have to rotate the title-text in some way.
Original comment by seiersbr...@gmail.com
on 8 Jun 2010 at 2:25
Was anyone able to figure out a solution to this issue?
Original comment by kreh...@gmail.com
on 28 Jan 2011 at 5:20
Figured it out... Thanks to seiersbr...@googlemail.com's post.. This is for IE
EAST Panel:
p.addListener(new PanelListenerAdapter() {
@Override
public void onCollapse(Panel panel) {
String panelTitleId = "panelTitle";
//Only need to set it once.
if (DOM.getElementById(panelTitleId) == null) {
com.google.gwt.user.client.Element panelElement = DOM.getElementById(panel.getId() + "-xcollapsed");
com.google.gwt.user.client.Element panelTitle = null;
panelTitle = DOM.createDiv();
panelTitle.setId(panelTitleId);
panelTitle.setInnerHTML("<span style=\"font:bold 11px Trebuchet Ms,tahoma,arial,helvetica,sans-serif;color:white;" +
"writing-mode: tb-rl;" +
"-webkit-transform: rotate(90deg);" +
"-moz-transform: rotate(90deg);" +
"\">" + panel.getTitle() + "</span>");
if (panelElement != null) {
JavaScriptObjectHelper.setAttribute(panelElement, "style.margin", "'3px 3px 5px 3px'");
DOM.appendChild(panelElement, panelTitle);
}
}
}
});
Original comment by kreh...@gmail.com
on 31 Jan 2011 at 6:33
Original issue reported on code.google.com by
mhutchin...@gmail.com
on 13 Feb 2008 at 9:45