ComboBox resizing issue

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

Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

ComboBox resizing issue

Postby Boost113 » Mon Feb 02, 2015 17:38


I'm trying to create a ComboBox which should display all items when the drop down list is open. Though, it seems to only resize to fit a single element:
Even worse with the same .layout a ComboBox in a slightly different place doesn't resize at all:

This is the layout:

Code: Select all

    <Window name="PlayerTNumber0TypeSelect" type="TaharezLook/Combobox">
        <Property name="Area" value="{{0.17, 0}, {0.34, 0}, {0.5, 0}, {0.5, 0}}"/>
        <Property name="Disabled" value="True"/> <!-- The window gets enabled after adding the elements, could that be the issue? -->
        <Property name="Font" value="Simonetta-Black"/>
        <Property name="Text" value="Choose controls/AI"/>

I add the strings to the combobox like in the samples:

Code: Select all

    CEGUI::Combobox* convbox = dynamic_cast<CEGUI::Combobox*>(obj);

        return false;
    // Imagine a loop here...
    convbox->addItem(new CEGUI::StandardItem(CEGUI::String(text)));

    // These don't seem to do what they are supposed to do
    // Loop ends here

Which should resize the drop down list to match the contents, right?

Version is my fork of default which should be up to date. Log doesn't have any errors related to this issue.

Any help on this would be much appreciated.

EDIT: As it turns out the size of the Combobox constrains the size of the drop down list (
So the fix to this issue is increasing the size of the combobox, but that doesn't do what I want. I want to have the list overlap widgets under it. Is there some widget/way to do that, then?

User avatar
Posts: 1995
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: ComboBox resizing issue

Postby Ident » Tue Feb 17, 2015 22:43

Yea a combobox will only expand as much as it allows in the widget's defined height. So you need to make it large.

What do you mean by "I want the widget to overlap widgets under it". This should be the case. Try the property AlwaysOnTop = True (i think thats how it is called, correct me if i m wrong). Does that make a difference?

Else explain the problem in more detail
CrazyEddie: "I don't like GUIs"

Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests