Good afternoon, dear smartgwt gurus!
My aim is to show different tooltip for every tree node when user hovers mouse over it. For this I'm doing it:
And I always see the node image in a tooltip, not the text which I set, like this:
BUT if I do this(i.e. remove tg.setCanHover(true)):
the tooltip text does appear instead of this node image, BUT it appears for the whole TreeGrid and also if I don't set canHover to true, hover events for rows and columns won't be fired, but I need it.
Can anybody advise anything to me?
Please, tell me, how can I replace content of the tooltip from the screenshot above? How can I show different tooltips for every node(row)? I've searched all the showcase and didn't find any examples for that. Example with tooltip in ListGrid works fine, but mine - doesnt, although I do the same things...
Thanks in advance!
My aim is to show different tooltip for every tree node when user hovers mouse over it. For this I'm doing it:
Code:
TreeGrid tg = new TreeGrid(); tg.setHoverMoveWithMouse(true); tg.setCanHover(true); tg.setShowHover(true); tg.setHoverOpacity(75); tg.addRowHoverHandler(new RowHoverHandler() { @Override public void onRowHover(RowHoverEvent event) { ListGridRecord lgr = event.getRecord(); if(lgr instanceof TreeNode) { TreeNode hoveredTreeNode = (TreeNode)lgr; tg.setPrompt("the name is: <BR>" + hoveredTreeNode.getName()); } } });
BUT if I do this(i.e. remove tg.setCanHover(true)):
Code:
TreeGrid tg = new TreeGrid(); tg.setHoverMoveWithMouse(true); tg.setHoverOpacity(75); tg.setPrompt("the name is: <BR> NAME");
Can anybody advise anything to me?
Please, tell me, how can I replace content of the tooltip from the screenshot above? How can I show different tooltips for every node(row)? I've searched all the showcase and didn't find any examples for that. Example with tooltip in ListGrid works fine, but mine - doesnt, although I do the same things...
Thanks in advance!
Comment