Button Fonts Colors - XML Tutorial
Version 1.6

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

Button's Property: setFontStyle, setFontSize, setBackground, setForeground

Button is part of the GUI elements in Bamboo Suite for building interactive Internet applications. setFontStyle, setFontSize, setBackground, setForeground are buttons properties that are used in the XML files to render the Button. In applet shown on the left these properties are demonstrated in action. The font types and colors in the Button'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 Button Properties.

See complete XML source for this applet.

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

Button_fonts_colors.XML Source:

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

[Home][Tutorial] [Demo]

Shape Borders Fonts & Colors Highlights Images Actions Other