Board Logo

multiple icons
siriustek - 6/29/2006 at 01:32 AM


A while ago, I recommended tigra pro menu to a client. They agreed and bought it. The first version of the software was a success. Now they want me to implement some new features:
- i need to show two icons instead of one
- and they need to be after the node text

Can you please help me out?
Kind regards..

Tolstoy - 6/29/2006 at 05:08 AM

You can simply put some HTML in your labels, namely the img tag.

Try this example.... reference both 'Top Frame' entries. You can test it by replacing the tree_items.js in demo2 with the following.


['Frame targeting', 0, 0,
['Same frame','links.html',{'tw':'_self'}],
['Top frame <img border=0 src=icons/base.gif>&nbsp;<img border=0src=icons/folder.gif>','links.html',{'tw':'_top'}],
['New window','links.html',{'tw':'_blank'}],
['Window named frames', 0, 0,
['Top frame <img border=0 src=icons/base.gif>','links.html',{'tw':'top_frame'}],
['Left Frame','links.html',{'tw':'left_frame'}],
['Right frame','links.html',{'tw':'right_frame'}],
['Bottom frame','links.html',{'tw':'bottom_frame'}],

You can't do this natively without modifying the tree.js drastically. I've attached a screen shot to demonstrate.


siriustek - 6/29/2006 at 06:19 AM

We'll give it a try

Tolstoy - 6/29/2006 at 09:30 AM

If you want to add a second icon on the left side, simply add the following BEFORE the label:

'&nbsp;<img border=0 src=someicon.gif> Some Label'

The &nbsp; adds a 'non-breaking space', which is useful for keeping things fromcrammingtogether. :)


Back to forum: