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: setFontStyle, setFontSize, setFontName, setBackground, setForeground

setFontStyle, setFontSize, setBackground, setForeground are combos properties that are used in the XML files to render the Combo box. In applet shown on the left these properties are demonstrated in action. The font types and colors in the Combo'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 XML Source


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

combo_fonts_colors.XML Source:

<Widget setSize="110,400" setBackground="f8f4db" setAlign="left" setBackgroundHighlight="d8d0bb">
<Combobox setShape="10,10,90,25" setLabel="font style" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="plain" setFontStyle="plain"/>
<Item setLabel="bold" setFontStyle="bold"/>
<Item setLabel="italic" setFontStyle="italic"/>
<Item setLabel="underline" setFontStyle="underline"/>
<Item setLabel="bolditalic" setFontStyle="bolditalic"/>
</Listbox>
</Combo>
<Combobox setShape="10,40,90,25" setLabel="font size" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="10" setFontSize="10"/>
<Item setLabel="12" setFontSize="12"/>
<Item setLabel="15" setFontSize="15"/>
<Item setLabel="18" setFontSize="18"/>
<Item setLabel="20" setFontSize="20"/>
<Item setLabel="22" setFontSize="22"/>
</Listbox>
</Combo>
<Combobox setShape="10,70,90,25" setLabel="font name" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="serif" setFontName="serif"/>
<Item setLabel="sansserif" setFontName="sansserif"/>
<Item setLabel="monospaced" setFontName="monospaced"/>
</Listbox>
</Combo>
<Combobox setShape="10,100,90,25" setLabel="background" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="red" setBackground="red"/>
<Item setLabel="oringe" setBackground="ff6600"/>
<Item setLabel="yellow" setBackground="yellow"/>
<Item setLabel="green" setBackground="green"/>
<Item setLabel="blue" setBackground="blue"/>
<Item setLabel="indigo" setBackground="6600cc"/>
<Item setLabel="violet" setBackground="6633cc"/>
</Listbox>
</Combo>
<Combobox setShape="10,130,90,25" setLabel="foreground" setForegroundHighlight="666666">
<Listbox setBackgroundHighlight="d8d0bb" setForegroundHighlight="666666" >
<Item setLabel="red" setForeground="red"/>
<Item setLabel="oringe" setForeground="ff6600"/>
<Item setLabel="yellow" setForeground="yellow"/>
<Item setLabel="green" setForeground="green"/>
<Item setLabel="blue" setForeground="blue"/>
<Item setLabel="indigo" setForeground="6600cc"/>
<Item setLabel="violet" setForeground="6633cc"/>
</Listbox>
</Combo>
</Widget>

[Home][Tutorial] [Demo]

Combo
Shape Borders Fonts & Colors Highlights Images Actions Other