i do a search of my tree for a particular node using the cascade function...
when i find it i call ensureVisible then get the Element and try to highlight it...
i tried like this:
node.ensureVisible();
var el = node.getUI().getEl()
var El = Ext.get(el); IDM Computer Solutions, Inc. Forums • View topic - help with :: Re: help with syntax highlighting, explorer display. Post by Mofi on Fri Jun 09, It is just a file tree view not an explorer instance inside UE. http://www.ultraedit.com/forums/viewtopic.php?f=46&t=3190HOME |
El.highlight()
then tried using a defer:
node.ensureVisible();
function highlight(){
var el = node.getUI().getEl()
var El = Ext.get(el);
El.highlight()
}
highlight.defer(500);
...i then found that the ensureVisible function has a callback and i tried that too but it didn't work either.... Sunday Highlights Photo Gallery by Matt Lane Photos at pbase.com:: Matt Lane Photos | profile | all galleries >> UPA College Championship 2007 ( Gallery of Galleries) >> Sunday Highlights, tree view | thumbnails | slideshow http://www.pbase.com/jmlane/collegeupa07_d3&view=treeHOME |
i even tried a 5000 milisecond defer and it still didn't work...
it can't find the el....
but when i run the whole function again it does works...!
this happens for any treenode that isn't visible when i call the function, once it's been shown (rendered i think..) then it finds the el and highlights it...
is this a bug, or am i doing something wrong...?
Many thanks in advance
SJ
The callback is the way to go:
node.ensureVisisble(function(){
var el = Ext.fly(node.getUI().getEl());
el.highlight();
});
And this?
node.ensureVisisble(function(){
var n = node.getOwnerTree().getNodeById(node.id);
var el = Ext.fly(n.getUI().getEl());
el.highlight();
});
...doesn't work either... says node.getOwnerTree() has no properties...
i should have mentioned that i'm using the column tree... but i'm guessing it shouldn't make much difference...?
hold on....
i changed it from node.getOwnerTree() to myTreePanel and now it works!!!!
ie var n = treePanel.getNodeById(node.id);
thanks alot Condor!!
for everyone else:
node.ensureVisible(function() {
var n = myTreePanel.getNodeById(node.id);
var el = Ext.fly(n.getUI().getEl());
el.highlight();
});
where myTreePanel is a reference to the TreePanel :)
is strange tho... i can only assume that the node object is replaced during the render process.... so somehow the other methods tried were holding a reference to a old node object...
perhaps a note about this could be added to the docs? if you agree i'll happily post again on the missing docs thread...
Cheers again
SJ
:)
unfortunetly it still doesn't work... same error:
"el has no properties"....
Nortel Unveils Vision, Strategy for Israeli High-Performance Net
Busy Friday Leads to Strong Close for Net Stocks
|