XML Tutorials Combo Box Shape
Version 1.6

This is the archives. For the latest Bambookit GUI 2.0, XML GUI Demos & Tutorials visit: www.bambookit.com/_demo.html

Combo's Property: setShape

Default setShape property for Combp is 80 by 25 pixels. setShape takes four parameters: x, y, width, hight. In this case Combo resides in the Widget, which is a panel. x and y refers to the widget coordinates. setLabel property is used to name the Combobox. The items in the Combobox are part of the listbox. As the user clicks on the triangles in the combobox, the listbox pop-up is displayed with the preset number of items. If you need more then 12 items to be displayed in the listbox of the combobox, you might consider using scrollbars. Please refer to the View section in this Tutorial on how to add scrolls to the Combobox. Refer to Reference for complete list of Properties.

See XML Source

HTML Source:
<html>
<body>
<applet archive="bamboo_1_5.jar" code="Loader.class" width=110 height=300>
<param name="loadgui" value="tutorials_combo_shape.xml">
</applet>
</body>
</html>

combo_shape.XML Source:

<Widget setSize="110,230" setBackground="f8f4db" setAlign="left" setBackgroundHighlight="d8d0bb">
<Combobox setShape="10,10,90,25" setBorder="small" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="test1"/>
<Item setLabel="test2"/>
<Item setLabel="test3"/>
<Item setLabel="test4"/>
<Item setLabel="test5"/>
<Item setLabel="test6"/>
<Item setLabel="test7"/>
</Listbox>
</Combobox >
<Combobox setShape="10,40,90,50" setBorder="medium" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="test1"/>
<Item setLabel="test2"/>
<Item setLabel="test3"/>
<Item setLabel="test4"/>
<Item setLabel="test5"/>
<Item setLabel="test6"/>
<Item setLabel="test7"/>
</Listbox>
</Combobox >
<Combobox setShape="10,90,90,75" setBorder="large" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="test1"/>
<Item setLabel="test2"/>
<Item setLabel="test3"/>
<Item setLabel="test4"/>
<Item setLabel="test5"/>
<Item setLabel="test6"/>
<Item setLabel="test7"/>
</Listbox>
</Combobox>
</Widget>

[Home][Tutorial] [Demo]

Combo
Shape Borders Fonts & Colors Highlights Images Actions Other