Page 1 of 1

Child Widgets Getting Disabled

Posted: Fri Feb 15, 2008 07:31
by Browser12
I have a window (FrameWindow)
which has editboxes and buttons in it.
When I click inside the window in the 'grey area' (not a child widget)
from then on I can't use any of the editboxes or buttons, etc.

Is there a reason for that?

This is what my code looks like:

Code: Select all

FrameWindow* BaseFrame = static_cast<FrameWindow*>(wmgr.createWindow("WindowsLook/FrameWindow", "root/newdialogue"));
BaseFrame->setAlwaysOnTop(true);
wmgr.getWindow("root")->addChildWindow(BaseFrame);
BaseFrame->setSize(UVector2(cegui_reldim(0.3f), cegui_reldim(0.35f)));
BaseFrame->setPosition(UVector2(cegui_reldim(0.3f),cegui_reldim(0.325f)));
BaseFrame->setSizingEnabled(false);
BaseFrame->setRollupEnabled(false);

Posted: Fri Feb 15, 2008 09:34
by CrazyEddie
It sounds most likely a "sibling issue" - where some sibling of the editboxes and buttons (for example an invisible default window, or maybe a static text or group box type affair) is getting moved in front of the other widgets when you click "in the grey area", and as such prevents the other widgets getting event notifications.

The solution is to make sure your Window hierarchies for such arrangements are not 'flat' - so if the above describes how you have things at all, add the editboxes / buttons to the offending 'container' type window instead of having them as siblings.

Posted: Fri Feb 15, 2008 23:10
by Browser12
Ah! One of my static text items in the window I had left oversized. That was the problem :]

Thanks!