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"/>
</Window>
I add the strings to the combobox like in the samples:
Code: Select all
CEGUI::Combobox* convbox = dynamic_cast<CEGUI::Combobox*>(obj);
if(!convbox)
return false;
// Imagine a loop here...
convbox->addItem(new CEGUI::StandardItem(CEGUI::String(text)));
convbox->setAutoSizeListHeightToContent(true);
// These don't seem to do what they are supposed to do
convbox->handleUpdatedListItemData();
convbox->updateAutoSizedDropList();
// 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 (http://cegui.org.uk/forum/viewtopic.php?f=10&t=6140).
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?