XML Tutorials Combo Box Fonts Colors
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 Properties: setHighlight, setRollover, setBackgroundHighlight, setForegroundHighlight

setHighlight, setRollover, setBackgroundHilight, setForegroundHilight are combo'c properties that are used in the XML files to add color highlights to the background and foreground of the combo. Keep in mind that there is default highlight background and foreground colors. In case of BackgroundHighlight set to any color, default foreground is always set to white, which means that setting background highlight to the light colors will make foreground color almost invisible.
On another hand default BackgroundHighlight is always set to the dark gray. So if we want to set highlight only for foreground colors, we have to set BackgroundHighlight to match combo's background color ("ffffff" in our case) to make it possible. This is demonstrated in the combobox with label set to 'foreground' on the left. Refer to Reference for complete list of Properties.

SeeXML Source

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

button_border.XML Source:

<Widget setSize="110,400" setBackground="f8f4db" setAlign="left" setBackgroundHighlight="d8d0bb">
<Combobox setShape="10,10,90,25" setLabel="highlights" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="true" setHighlight="true"/>
<Item setLabel="false" setHighlight="false"/>
<Item setLabel="true" setHighlight="true"/>
<Item setLabel="false" setHighlight="false"/>
<Item setLabel="true" setHighlight="true"/>
</Listbox>
</Combo>
<Combobox setShape="10,40,90,25" setLabel="rollover true" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" setRollover="true">
<Item setLabel="true" />
<Item setLabel="true" />
<Item setLabel="true" />
<Item setLabel="true" />
<Item setLabel="true" />
<Item setLabel="true" />
</Listbox>
</Combo>
<Combobox setShape="10,40,90,25" setLabel="rollover false" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" setRollover="false">
<Item setLabel="false" />
<Item setLabel="false" />
<Item setLabel="false" />
<Item setLabel="false" />
<Item setLabel="false" />
<Item setLabel="false" />
</Listbox>
</Combo>
<Combobox setShape="10,100,90,25" setLabel="background" setForegroundHighlight="666666">
<Listbox setForegroundHighlight="666666" >
<Item setLabel="red" setBackgroundHighlight="red"/>
<Item setLabel="oringe" setBackgroundHighlight="ff6600"/>
<Item setLabel="yellow" setBackgroundHighlight="yellow"/>
<Item setLabel="green" setBackgroundHighlight="green"/>
<Item setLabel="blue" setBackgroundHighlight="blue"/>
<Item setLabel="indigo" setBackgroundHighlight="6600cc"/>
<Item setLabel="violet" setBackgroundHighlight="6633cc"/>
</Listbox>
</Combo>
<Combobox setShape="10,130,90,25" setLabel="foreground" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="ffffff">
<Item setLabel="red" setForegroundHighlight="red"/>
<Item setLabel="oringe" setForegroundHighlight="ff6600"/>
<Item setLabel="yellow" setForegroundHighlight="yellow"/>
<Item setLabel="green" setForegroundHighlight="green"/>
<Item setLabel="blue" setForegroundHighlight="blue"/>
<Item setLabel="indigo" setForegroundHighlight="6600cc"/>
<Item setLabel="violet" setForegroundHighlight="6633cc"/>
</Listbox>
</Combo>
</Widget>

[Home][Tutorial] [Demo]

Combo
Shape Borders Fonts & Colors Highlights Images Actions Other