Child Widgets Getting Disabled

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Browser12
Not too shy to talk
Not too shy to talk
Posts: 42
Joined: Thu Jan 24, 2008 06:30
Location: UW-Madison
Contact:

Child Widgets Getting Disabled

Postby Browser12 » Fri Feb 15, 2008 07:31

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);

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Fri Feb 15, 2008 09:34

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.

Browser12
Not too shy to talk
Not too shy to talk
Posts: 42
Joined: Thu Jan 24, 2008 06:30
Location: UW-Madison
Contact:

Postby Browser12 » Fri Feb 15, 2008 23:10

Ah! One of my static text items in the window I had left oversized. That was the problem :]

Thanks!


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 9 guests