XML Tutorials Checkbox Highlights
Version 1.6

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

Checkbox's Property: setHighlight, setRollover, setBackgroundHighlight, setForegroundHighlight

setHighlight, setRollover, setBackgroundHilight, setForegroundHilight are Checkboxes properties that are used in the XML files to add colors highlights to the background and foreground of the Checkboxes. 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. This is demonstrated on the applet on the left in lavander. We had to set setForeground("000066") and setForegroundHighlight(000066) to the same dark color to araise the white defaults settings for foreground colors, while the rose Checkbox displayes default white settings for forground.
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 the color of Widget Background to make it possible. This is demonstrated in the mint and chamomile Checkboxes in the applet on the left. Refer to Reference for complete list of Properties.

See XML Source

HTML Source:
<applet archive="bamboo_1_5.jar" code="Loader.class" width=110 height=400>
<param name="loadgui" value="tutorials_checkbox_highlights.xml">

tutorials_checkbox_highlights.XML Source:

<Widget setSize="110,400" setBackground="cdc9ee">
<Widget setShape="10,10,90,25" setLabel="Highlight" setFontstyle="bold" setOpaque="false"/>
<Checkbox setShape="10,40,90,25" setLabel="true" setHighlight="true"/>
<Checkbox setShape="10,70,90,25" setLabel="false" setHighlight="false"/>
<Checkbox setShape="10,100,90,25" setLabel="Rollover" setFontstyle="bold" setOpaque="false"/>
<Checkbox setShape="10,130,90,25" setLabel="true" setRollover="true"/>
<Checkbox setShape="10,160,90,25" setLabel="false" setRollover="false"/>
<Checkbox setShape="10,190,90,15" setLabel="Background" setFontstyle="bold" setOpaque="false"/>
<Checkbox setShape="10,205,90,15" setLabel="Highlight" setFontstyle="bold" setOpaque="false"/>
<Checkbox setShape="10,220,90,25" setLabel="rose" setBackground="666699" setBackgroundHighlight="663399"/>
<Checkbox setShape="10,250,90,25" setLabel="lavander" setBackground="666699" setForeground="000066" setForegroundHighlight(000066) setBackgroundHighlight("663399")></Button>
<Checkbox setShape="10,280,90,15" setLabel="Foreground" setFontstyle="bold" setOpaque="false"/>
<Checkbox setShape="10,295,90,15" setLabel="Highlight" setFontstyle="bold" setOpaque="false"/>
<Checkbox setShape="10,310,90,25" setLabel="mint" setForeground="666699" setForegroundHighlight="000066" setBackgroundhighlight="ffffff"/>
<Checkbox setShape="10,340,90,25" setLabel="chamomile" setForeground="666699"setForegroundHighlight="000066"/>

[Home][Tutorial] [Demo]

Shape Borders Fonts & Colors Highlights Images Other