|
Individual XP Item Styles
|
Individual XP Item Styles
|
|
Individual XP item styles are special menu parameters (arrays) that you can assign to submenus titles in XP-style:
var tstyles = [
["paramName=value", "paramName=value", "paramName=value", ...], // style with index 0
["paramName=value", "paramName=value", "paramName=value", ...], // style with index 1
...
];
Each style can accept the following item parameters:
paramName=value |
Description |
tXPTitleBackColor=#0000FF |
Normal and mouseover colors of a title background. |
tXPTitleBackImg=titleback.gif |
Normal and mouseover background images of a title. |
tXPTitleLeft=left.gif |
Image of a left border of a title.
Used when titles have no icons. |
tXPTitleLeftWidth=4 |
Width of a left border of a title. |
tXPExpandBtn=exp1.gif,exp2.gif,col1.gif,col2.gif |
Button images within a title.
4 states:
- expanded-normal
- expanded-mouseover
- collapsed-normal
- collapsed-mouseover |
|
Once you created item styles you can assign them to menu items.
For example:
var tXPStyles = [
["tXPExpandBtn=exp1.gif,exp2.gif,col1.gif,col2.gif", "tXPTitleBackImg=titleback.gif"], // style 0
["tXPTitleBackColor=#D9DAE2", "tXPTitleBackImg=titleback2.gif"], // style 1
];
var tmenuItems = [
["First XP Submenu", "", "titleicon.gif", "", "", "Title Tip", "", "0"], // assign XP style 0
["|Item 1"],
["|Item 2"],
["|Item 3"],
["Second XP Submenu", "", "titleicon2.gif", "", "", "Title Tip", "", "1"], // assign XP style 1
["|Item 4"],
["|Item 5"],
["|Item 6"],
];
Menu data are placed within data-tree.js file. This file contains:
1. Menu parameters
2. Menu items, individual styles and individual xp styles
3. Function for a menu initialization (dtree_init();)
|