combo box weirdness

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

combo box weirdness

Postby gcarlton » Mon Dec 13, 2004 21:58

I've found that the combobox doesn't expand beyond the parent window size - perhaps this is the reason the drop down list is less than expected. Iis the 30% in comparison to the standard API combobox, or a previous CEGUI version?

User avatar
nfz
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed Jan 12, 2005 12:06

combo box weirdness

Postby nfz » Tue Dec 14, 2004 03:44

If its the child list box being clipped (most probable) then there are a few solutions. The easiest fix I found so far is the following code snippet:

Code: Select all

CEGUI::Window* droplist = mComboboxWidget->getChild(mComboboxWidget->getName() + "__auto_droplist__");

droplist->setClippedByParent(false);



What the code does is get the child listbox, which was created by the combobox, and then sets the flag to indicate that the listbox window is not to be clipped by any parent windows. You only need to do this once when the combobox is created.

User avatar
nfz
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed Jan 12, 2005 12:06

combo box weirdness

Postby nfz » Tue Dec 14, 2004 04:11

Forgot to mention that the vertical size of the Combobox effects the vertical size of the droplist too which is probably your problem and not clipping (yet).

The vertical size of the combobox effects both the vertical size of the editbox and the combobox. Think of the vertical size of the combobox as the sum of the editbox height and the droplist vertical size that you want. The vertical size of the editbox will be 1.5 times the font height (for TL widgets). So combobox height - editbox height will be the droplist height. If combobox height is less than the editbox height then you will only see a portion of the editbox and nothing of the drop list.

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

combo box weirdness

Postby CrazyEddie » Tue Dec 14, 2004 09:37

@Lettique:
Everything posted so far is correct, if this is not the issue you're having, then please provide code or XML layout snippets, and if at all possible a screenshot to indicate the exact problem.

Thanks,

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests