XML Tutorials Edit 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

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

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

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

Edit_fonts_colors.XML Source:

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

[Home][Tutorial] [Demo]

Shape Borders Fonts & Colors Other