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_setSelectionEffects(Item, [BorderNormalColor], [BorderNormalStyle], [BorderOverColor], [BorderOverStyle], [BorderSize], [MarginH], [MarginV])


Description

Defines the selection style for the specified Item.
All the parameters are optional so it is possible to specify only the parameters that you want to change.

Code sample
var id = dmbAPI_getItemByCaption("My Command");
dmbAPI_setSelectionEffects(id, null, null, null, null, 4, 3, null;
This sample demonstrates how to define the selection effect of a menu item.
In this sample, the selection effect for the menu item whose caption is "My Command" will be changed so that its border size is set to 3 pixels and the horizontal margin is set to 3 pixels. All other parameters are passed as "null" which means that they will not be changed.

Parameters

Item (objid) The toolbar item or command that will receive the image.

BorderNormalColor (string) (Optional) The color of the border in its normal state.

BorderNormalStyle (string) (Optional) The style of the border in its normal state. The possible values are:
  • none
  • dotted
  • dashed
  • solid
  • double
  • groove
  • ridge
  • inset
  • window-inset
  • outset

Note that not all styles are supported or rendered equally by all browsers.


BorderOverColor (string) (Optional) The color of the border when the mouse is moved over the menu item.

BorderOverStyle (string) (Optional) The style of the border when the mouse is moved over the menu item.

BorderSize (integer) (Optional) The size of the border in pixels.

MarginH (integer) (Optional) Internal horizontal margin of the command.
This value is the distance between the leftmost border of the command and its caption.

MarginV (integer) (Optional) Internal vertical margin of the group.
This value is the distance between the topmost border of the command and its caption.