<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Mifjs forum — Mif.Tree, Mif.Menu - 1 Line of display code for highlighting control]]></title>
	<link rel="self" href="http://www.mifjs.net/forum/feed/atom/topic/125/"/>
	<updated>2009-04-15T17:01:33Z</updated>
	<generator>PunBB</generator>
	<id>http://mifjs.net/forum/topic/125/</id>
		<entry>
			<title type="html"><![CDATA[1 Line of display code for highlighting control]]></title>
			<link rel="alternate" href="http://mifjs.net/forum/post/465/#p465"/>
			<content type="html"><![CDATA[Hey, 

Could you change Mif.Tree.Draw.getHTML to include the below span tag and class?  This allows me to highlight the node image and text like they do in vista.  Let me know what ya think.  

Thanks!

Will

Code: All i did was add a [color=blue]span[/color] tag with the class [color=red]'mif-tree-node-content-wrapper'[/color]

[code]
Mif.Tree.Draw.getHTML = function(node,html){
        var prefix=node.tree.DOMidPrefix;
        if($defined(node.state.checked)){
            if(!node.hasCheckbox) node.state.checked='nochecked';
            var checkbox='<span class="mif-tree-checkbox mif-tree-node-'+node.state.checked+'" uid="'+node.UID+'">'+Mif.Tree.Draw.zeroSpace+'</span>';
        }else{
            var checkbox='';
        }
        html=html||[];
        html.push(
        '<div class="mif-tree-node ',(node.isLast() ? 'mif-tree-node-last' : ''),'" id="',prefix,node.UID,'">',
            '<span class="mif-tree-node-wrapper ',node.cls,'" uid="',node.UID,'">',
                '<span class="mif-tree-gadjet mif-tree-gadjet-',node.getGadjetType(),'" uid="',node.UID,'">',Mif.Tree.Draw.zeroSpace,'</span>',
                '<span class="mif-tree-node-content-wrapper" uid="',node.UID,'">',
                    checkbox,
                    '<span class="mif-tree-icon ',node.closeIcon,'" uid="',node.UID,'">',Mif.Tree.Draw.zeroSpace,'</span>',
                    '<span class="mif-tree-name" uid="',node.UID,'">',node.name,'</span>',
                '</span>',
            '</span>',
            '<div class="mif-tree-children" style="display:none"></div>',
        '</div>'
        );
        return html;
    };

[/code]]]></content>
			<author>
				<name><![CDATA[wbarnes]]></name>
				<uri>http://mifjs.net/forum/user/57/</uri>
			</author>
			<updated>2009-04-15T17:01:33Z</updated>
			<id>http://mifjs.net/forum/post/465/#p465</id>
		</entry>
</feed>

