|
|
How I can style all dhtml meny items to have font bold when selected?
Return to Recent Questions
Q:
Can you please give me tips on how I can style all menuitems to
have font bold when selected and normal font when not selected?
A:
Unfortunately, Deluxe Tree doesn't have such a feature. You can only
set it's color. You cannot set the font of menu item bold when selected.
You can set menu item's font bold onMouseover, see example here:
http://deluxe-tree.com/data-templates/vista-style-7-template-sample.html
You should add
the following code in your data file:
function changeFont(obj, over)
{
obj.style.fontWeight = over ? 'bold' : 'normal';
obj.style.fontSize = over ? '13px' : '12px'; // You can not use this line
}
var tmenuItems = [
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Security</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Ease of Access</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Internet Options</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Windows Firewall</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Network and Internet</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Hardware</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Programs</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Appearance</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>User Accounts</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Personalization</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Sound and Speech</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Additional Options</div>","", "", "", "", "", "", "", "", ],
];
Please, notice also that you should add this function every time when
you change your menu in Deluxe Tuner application, as Tuner deletes
this function.
Return to Recent Questions
Related:
- Sep 25, 2006 - My menu icons are not appearing in the preview, or when I launch deluxe-menu.html
- Oct 22, 2006 - Why I now have double drag menus and how to correct?
- Nov 21, 2006 - How are this javascript scrolling menu compatible with Frontpage 2003?
- Dec 06, 2006 - Is using search engine friendly code the same as using normal html menu bar for spiders?
- Dec 24, 2006 - How to get side menu items to swap images to use like a traditional image rollover.
- Jan 10, 2007 - I'm looking for a html mouseover menu system that can be placed in a cell.
- Jan 27, 2007 - Is it possible to change the position of a menu item in the
- Feb 13, 2007 - I am looking to integrate your menus javascript system into a CMS such as Joomla.
- Feb 28, 2007 - Since I installed the floating menu script on our website the homepage loads slowly
- March 16, 2007 - How multiple users could get varying transparent menus using file driven approach
- April 06, 2007 - Is there a way to have an automatic line-break for large submenu items in tree?
|