PDA

View Full Version : [FIXED] Window setHeaderVisible(false);



audra
28 Feb 2012, 6:37 PM
doesn't remove the header div from the element. it's empty, but the space is still visible.

sven
28 Feb 2012, 7:20 PM
I guess you are using GXT 3? I moved this thread to the proper location.

WesleyMoy
1 Mar 2012, 8:37 PM
This is intentional. A window floats above other content and can be moved by dragging its header. We provide no facility to hide this header as this would remove the obvious place to drag.

If you still want to create this effect, it should be sufficient to create a new Resources interface (extending, say, BlueWindowResources) that points at your own CSS. In particular, you will probably want to set the height of .headerText to 0 and reset the padding on .header to the value in the Base theme (that is, 4px 3px 2px 5px). This will give you an undraggable window with the same size of border on all sides.

audra
5 Mar 2012, 11:32 AM
so what is the purpose of setHeaderVisible(false) then? cause if i set it to false or not, it has the exact same effect...

arkadye
12 Mar 2012, 12:08 PM
setHeaderVisible(false) worked correctly in GXT 2.2.5 - it removed the header from the Window or ContentPanel. We should be able to hide the header without having to change the appearance. Obviously, developers will not use this method if they need drag capability, but there are cases when drag is not required - we just need to open a pop-up and position it. Please fix this issue.

vokiel
13 Mar 2012, 9:46 AM
Ran into this issue as well, except I was able to just use a SimpleContainer with an appropriate child container.

The only problem I have with ContentPanel imposing drag like this, is it's just not named right and there shouldn't be a setHeaderVisible at all. As others have posted before me, the class is a bit nonsensical if it behaves like that. (make a DraggableContentPanelDecorator maybe)

WesleyMoy
13 Mar 2012, 2:01 PM
Window in 2.x did have a setHeaderVisible that would simply make the entire header portion hidden. However, while a ContentPanel without a header made some sense, a Window without a header seemed like a much less obviously useful feature.

At the moment, you may be able to achieve this behaviour by subclassing BlueWindowAppearance. Even setting top to display: none seems to go a long way toward achieving this effect.

Nevertheless, thank you for all your feedback. I've filed a ticket against the team. We'll post to this thread when we make any changes to either support the 2.x behaviour as is or change to a different behaviour.

darrellmeyer
19 Mar 2012, 8:32 PM
This is now fixed in SVN (rev 2433). The header is correctly hidden for Window.

WesleyMoy
28 Mar 2012, 2:16 PM
This missing feature has been added in the Ext GWT 3.0 Release Candidate. Please upgrade your copy of Ext GWT and try your scenario again. While we're confident that we've addressed this issue, please reply if you notice any continued problems after upgrading. Again, thanks for taking the time to report this bug.