slapin
Hi all!
I have the following code:
UIElement@ CreateShapeType()
{
UIElement@ uie = UIElement();
uie.SetFixedHeight(30);
Text@ item = Text();
item.style = "PropertyText";
item.size = IntVector2(100, 30);
item.text = "Shape";
DropDownList@ lv = DropDownList();
lv.style = "PropertyListView";
lv.SetStyleAuto();
Text@ item1 = Text();
item1.style = "PropertyText";
item1.size = IntVector2(60, 30);
item1.text = "CAPSULE";
lv.AddItem(item1);
Text@ item2 = Text();
item2.style = "PropertyText";
item2.size = IntVector2(60, 30);
item2.text = "BOX";
lv.AddItem(item2);
lv.position = IntVector2(70, 0);
lv.size = IntVector2(90, 36);
lv.minHeight = 30;
lv.selection = 1;
lv.resizePopup = true;
lv.getPopup().SetStyleAuto();
uie.AddChild(item);
uie.AddChild(lv);
uie.SetStyleAuto();
return uie;
}
This displays empty DropDownList, if I click it displays empty popup. So this behaves like it is empty.
The decoration is fine.
Styles:
<element type="PropertyText">
<attribute name="Font" value="Font;Fonts/Anonymous Pro.ttf" />
<attribute name="Font Size" value="18" />
<attribute name="Color" value="0.3 0.2 0.2" />
</element>
<element type="PropertyListView" style="HierarchyListView">
<attribute name="Hierarchy Mode" value="true" />
<attribute name="Base Indent" value="1" /> <!-- Allocate space for overlay icon at the first level -->
<element type="BorderImage" internal="true">
<element type="HierarchyContainer" internal="true">
<attribute name="Layout Mode" value="Vertical" />
</element>
</element>
<element type="UIElement" internal="true">
</element>
</element>