Home - Forums-.NET - FlyTreeView (ASP.NET) - Feature request: mouseovers on +/- buttons

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Feature request: mouseovers on +/- buttons
Link Posted: 20-Mar-2007 11:02
My company is going to purchase FlyTreeView very shortly; the request is going thru the channels.

I really like the price, the easy installation in my apps, and the rather elegant scripting hooks on the client and server side.

It would be just frosting on the cake if we can get mouseovers on the +/- buttons, so that my apps are consistent in this behavior; all interface elements with actions have mouseovers in my apps.
Link Posted: 20-Mar-2007 12:28
Thank you for the request.

Do you need to change icon URL when mouse pointer is over the node +/-? Or do you need to make node content (text)  to use its Hover style?
Link Posted: 20-Mar-2007 12:48
[quote="EvgenyT"]Thank you for the request.

Do you need to change icon URL when mouse pointer is over the node +/-? Or do you need to make node content (text)  to use its Hover style?


I think i need to change the node +/- bitmap itself, and there doesn't seem to be any hooks right now to do that.

In my app, a node click opens up the object to view it in the other panes of the window. So the mouseover on the text indicates that it is a live node for viewing the object.

But since the node +/- buttons don't mouseover, a user is going to think that the buttons don't do anything.
Link Posted: 20-Mar-2007 13:34
I just experimented with onmouseover handler of FlyTreeView this seems to work as you request:


var plusPattern = \"QpWltnU83g_zM570\";
var plusHoverUrl = \"/test/img/hover_plus.gif\";
var minusPattern = \"Fy55sb6maSj0\";
var minusHoverUrl = \"/test/img/hover_minus.gif\";

function handleFTVOver(event)
{
    var srcElement = event.target ? event.target : event.srcElement;
    proceedElementHover(srcElement, plusPattern, plusHoverUrl);
    proceedElementHover(srcElement, minusPattern, minusHoverUrl);
}
function proceedElementHover(element, testPattern, hoverUrl)
{
    if (element.tagName == \"IMG\" && element.src.indexOf(testPattern) != -1)
    {
        var originalSrc = element.src;
        element.src = hoverUrl;
        var hoverSrc = element.src;
        element.onmouseout = function() { if (hoverSrc == element.src) element.src = originalSrc; };
    }
}



    
        
            
            
        
        
        
    



All you need is to change plusPattern, plusHoverUrl, minusPattern and minusHoverUrl to your values.
Link Posted: 21-Mar-2007 09:39
Thank you. That works fine. It took me a while to figure out what the patterns were, but otherwise it was fairly easy to do.