PDA

View Full Version : constrain window to a tabItem



tautologe
24 May 2009, 11:10 AM
Hello,
i want to create a window that only lives in a certain TabItem. It is only visible, when this TabItem is active and its position is contrained to this TabItem only.

In Ext JS i think there is a parameter "renderTo", is there something similar in ext gwt?

I yet tried to use tabItem.add(window) and window.setConstrain(true), but i dont get the desired result. The window is contrained to the Viewport, but not to the TabItem.

Thanks in advance!

tautologe
24 May 2009, 11:16 AM
i'm sorry, i used the wrong forum, could somebody please move this thread to gxt help 1.x?

thanks!

calicoder
26 May 2009, 9:28 PM
I'm not sure if this works in 1.x, but I've used in 2.x


@Override
protected void onRender(Element el, int pos) {
super.onRender(el, pos);

// confine dragging to container element bounds
getDraggable().setContainer( (Component) getParent() );
}