Javabase LogoExample of changing parameter fontstyle
  Home
  Applets
    Menus
    Site Mapping
    Scrollers
    FX Menus
    Image FX
  FAQ
  Register
  Contact
Back to other parameters

 

Example 1
Source menu file
Javabase Applet
Menu source
<?xml version = "1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE Menu PUBLIC "-//Javabase//DTD TreeMenu3D 1.0//EN" "http://www.javabase.co.uk/TreeMenu3D/TreeMenu3D.dtd">
<Menu textcolor="0000AA" tooltiptext="Tooltip" fontstyle="i" gap="4">
   <Item url="http://news.bbc.co.uk/" name="News\Headlines"/>
   <SubMenu name="Search">
      <Item tooltiptext="Go Search!" url="http://www.google.com/" name="Google"/>
      <Item tooltiptext="Tooltip" url="http://www.yahoo.com/" name="Yahoo"/>
   </SubMenu>
   <Item url="http://java.sun.com/" name="Java"/>
</Menu>

 

Example 2
Source menu file
Javabase Applet
Menu source
<?xml version = "1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE Menu PUBLIC "-//Javabase//DTD TreeMenu3D 1.0//EN" "http://www.javabase.co.uk/TreeMenu3D/TreeMenu3D.dtd">
<Menu textcolor="0000AA" tooltiptext="Tooltip" fontstyle="b" gap="4">
   <Item url="http://news.bbc.co.uk/" name="News\Headlines"/>
   <SubMenu name="Search">
      <Item tooltiptext="Go Search!" url="http://www.google.com/" name="Google"/>
      <Item tooltiptext="Tooltip" url="http://www.yahoo.com/" name="Yahoo"/>
   </SubMenu>
   <Item url="http://java.sun.com/" name="Java"/>
</Menu>
Specifying fonts
Fonts for a particular part of the menu (here called fontstyle) are specified using three different parameters: the font's name, the font's size and the font's style.
fontstylename
This is the name of the font to use. Unfortunately, different fonts are available on different browsers.However, the following font names are usually available universally: Times, Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput and ZapfDingbats.
fontstylestyle
This is the point (pt) size of the font which you wish to use.
fontstylesize
This parameter can be used to specify the font style. It should be set to "" for the default style,"i" for italic, "b" for bold and "bi" for bold italic.

 

Back to other parameters