Page 1 of 1
combo box weirdness
Posted: Mon Dec 13, 2004 21:58
by gcarlton
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?
combo box weirdness
Posted: Tue Dec 14, 2004 03:44
by nfz
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.
combo box weirdness
Posted: Tue Dec 14, 2004 04:11
by nfz
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.
combo box weirdness
Posted: Tue Dec 14, 2004 09:37
by CrazyEddie
@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.