TabsControl inside Window

I’m trying to use a TabsControl (with TabControls in) in a Window, but am experiencing a strange problem.

Whenever I click on the window to drag it, the active tab content area is erased!

The activeTab variable remains, however, so if you try to click on the button for the tab that was just active, it won’t show (as it thinks it’s already being shown).

I’m not sure what happens here. I’ve tried checking if it’s something in onFocus, but that is never called on the window nor the tab.

I’ve also tried setting focusable to false on the tabs control element, with no effect.

What happens when you click on the window (before startDrag is called) that could be causing this behaviour?

My layout is as follows:

[xml]<control name=“window” id=“community_window” revert=“false” childLayout=“vertical”

width=“300” height=“400” x=“50” y=“50” title="${labels.community_title}"

visible=“true” hideOnClose=“true” handle=""


<panel childLayout=“vertical” width=“100%” height=“100%” backgroundColor="#77777777"


<control name=“nifty-tabs” id=“tabs_panel” buttonWidth=“33%”>

<control id=“tab_groups” name=“nifty-tab” caption="${labels.community_groups}">

<panel childLayout=“vertical” width=“100%” height=“100%” style="">

<control name=“listBox” id=“groups_list” width=“100%” height=""

vertical=“on” horizontal=“off” selection=“Disabled” displayItems=“15”


<panel childLayout=“horizontal” width=“100%” align=“center”>

<image id="#group-icon" width=“20px” height=“20px” />

<text id="#group-name" font=“Interface/Fonts/freesans-12.fnt” align=“left”

textHAlign=“left” height=“20px” width="
" />



<control name=“button” id=“create_group_button” align=“center”


<interact onClick=“createGroup()”/>




<control id=“tab_friends” name=“nifty-tab” caption="${labels.community_friends}">

<panel childLayout=“vertical” width=“100%” height=“100%”>

<text style=“base-font” text=“Friends tab”/>



<control id=“tab_reputation” name=“nifty-tab” caption="${labels.community_reputation}">

<!-- <panel childLayout=“vertical” width=“100%” height=“100%”> -->

<text style=“base-font” text=“Reputation tab”/>

<!-- </panel> -->





Some additional information:

I’ve set the selection parameter of the ListBox to selection=“Single” and also removed it completely, but it won’t let me select.

Instead the scrollbar just flashes once when I click on an item in the list.

Similar to the first tab button in the TabsControl flashing once when I click on the window (handle) to drag.

Does anyone have a clue as to what could cause this strange behaviour?

Has anyone solved this yet or any idea? I have the same problem.

I’ve as yet been unable to solve it, but we’ve gone over to using static, “sliding” panel instead of popup-windows, to get around the problem.

I found one solution for me. Though this only works if you always have 2 tabs or more and if you know the IDs of at least two tabs at any given time.

It also seems to be slowing down the dragging process when it starts, causing “lag”.

What did I do? I simply put my tabs into a control definition and in its controller I implemented the onStartScreen()-method like this:


String selectedTab = m_tabs.getSelectedTab();





the tabs control is not quite where we’d like it to be … but I’ve heard someone works on an improved version …