DHTML Menu Builder [DynAPI 1.1]
<developers_edition>
Saturday April 12, 2008

 

 

WARNING: The information on this documentation will change as the development on this version of DHTML Menu Builder progresses.
It is VERY important that you always refer to the information provided in this document prior to testing new versions of the DynAPI code.


Setting Styles Functions

void dmbAPI_setFont(Item, NormalStyle, OverStyle, Size)


Description

Sets the font of a menu item.

Code sample
var id = dmbAPI_getItemByCaption("My Command");
dmbAPI_setFont(id, "Tahoma|B|N|N", "Tahoma|B|N|U", 9);
This sample demonstrates how to change the font of a menu item.
First we obtain a reference to the menu item whose caption we want to change and pass it to the dmbAPI_setFont function along with the new font.

Parameters

Item (objid) The toolbar item to be removed must be passed as a parameter to the function.

NormalStyle (string) The text style in the form of "FontFamily|Bold|Italic|Underline" when the mouse is not over the item.

OverStyle (string) The text style in the form of "FontFamily|Bold|Italic|Underline" when the mouse is over the item.

Size (integer) The test size of the menu item in pixels.

Remarks

To specify the Bold state use "B", otherwise use "N".
To specify the Italic state use "I", otherwise use "N".
To specify the Underline state use "U", otherwise use "N".

For example, to set the normal state font to "Tahoma 12, Bold" and the over state font to "Tahoma 12, Bold, Underline" use:
dmbAPI_setFont(ItemID, "Tahoma|B|N|N", "Tahoma|B|N|U", 12);