XML Tutorials - Checkbox Font Color
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: setFontStyle, setFontSize, setBackground, setForeground

setFontStyle, setFontSize, setBackground, setForeground are Checkboxes properties that are used in the XML files to render the Checkboxes. In applet shown on the left these properties are demonstrated in action. The font types and colors in the Checkbox's labels can be configured. The Fontname can be configured as Serif, Sanssserif, or monospaced. Fontstyle can be configured as Bold, Italic, Plain, Bolditalic, Underline. The point size can be set from 6 tp 120. Background and Forground color can be configured to be set to any 6 digit hexadecimal (RGB) value.

Refer to Reference for complete list of Properties.

See complete XML source for this applet.

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

tutorials_Checkbox_fonts_colors.XML Source:

<Widget setSize="110,400" setBackground="ffffff">
<Checkbox setShape="10,10,90,25" setLabel="plain" setFontStyle="plain" setOpaque="false"/>
<Checkbox setShape="10,40,90,25" setLabel="bold" setFontStyle="bold" setOpaque="false"/>
<Checkbox setShape="10,70,90,25" setLabel="italic" setFontStyle="italic" setOpaque="false"/>
<Checkbox setShape="10,100,90,25" setLabel="underline" setFontStyle="underline" setOpaque="false"/>
<Checkbox setShape="10,130,90,25" setLabe="bolditalic" setFontStyle="bolditalic" setOpaque="false"/>
<Checkbox setShape="10,160,90,25" setLabel="8" setFontSize="8" setOpaque="false"/>
<Checkbox setShape="10,190,90,25" setLabel="14" setFontSize="14" setOpaque="false"/>
<Checkbox setShape="10,220,90,25" setLabel="20" setFontSize="20" setOpaque="false/">
<Checkbox setShape="10,250,90,25" setLabel="ffaaaa" setBackground="ffaaaa" />
<Checkbox setShape="10,250,90,25" setLabel="99ee99" setBackground="99ee99" />
<Checkbox setShape="10,250,90,25" setLabel="cc2222" setForeground="cc2222" />
<Checkbox setShape="10,250,90,25" setLabel="22aa22" setForeground="22aa22" />
<Widget setSize="110,400" setBackground="cdc9ee">
</Widget>

[Home][Tutorial] [Demo]

Checkbox
Shape Borders Fonts & Colors Highlights Images Other