Javabase LogoExample of changing parameter tooltipfontname
  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 IconTreeMenu 1.0//EN" "http://www.javabase.co.uk/IconTreeMenu/IconTreeMenu.dtd">
<Menu textcolor="0000AA" folderopen="folder_open.gif" tooltiptext="Tooltip" tooltipfontname="serif" mouseovercolor="AAAAFF" icon="file.gif" folder="folder.gif">
   <Item name="BBC News" url="http://news.bbc.co.uk/"/>
   <SubMenu name="Search">
      <Item name="Google" url="http://www.google.com/" tooltiptext="Go Search!"/>
      <Item name="Yahoo" url="http://www.yahoo.com/" tooltiptext="Tooltip"/>
   </SubMenu>
   <Item name="Java" url="http://java.sun.com/"/>
   <Item name="Multi-\line !"/>
</Menu>

 

Example 2
Source menu file
Javabase Applet
Menu source
<?xml version = "1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE Menu PUBLIC "-//Javabase//DTD IconTreeMenu 1.0//EN" "http://www.javabase.co.uk/IconTreeMenu/IconTreeMenu.dtd">
<Menu textcolor="0000AA" folderopen="folder_open.gif" tooltiptext="Tooltip" tooltipfontname="dialog" mouseovercolor="AAAAFF" icon="file.gif" folder="folder.gif">
   <Item name="BBC News" url="http://news.bbc.co.uk/"/>
   <SubMenu name="Search">
      <Item name="Google" url="http://www.google.com/" tooltiptext="Go Search!"/>
      <Item name="Yahoo" url="http://www.yahoo.com/" tooltiptext="Tooltip"/>
   </SubMenu>
   <Item name="Java" url="http://java.sun.com/"/>
   <Item name="Multi-\line !"/>
</Menu>
Specifying fonts
Fonts for a particular part of the menu (here called tooltipfontname) are specified using three different parameters: the font's name, the font's size and the font's style.
tooltipfontnamename
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.
tooltipfontnamestyle
This is the point (pt) size of the font which you wish to use.
tooltipfontnamesize
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