TreeView Problem - Setting focus on current Node causes scrolling

C

Chris van Renen

Hi,

I recently had a problem with the TreeView control as it kept jumping
(setting focus) to the currently selected Node in the TreeView which causes a
problem when that Node is not currently displayed on screen. In other words,
when I try to right click (I use my own context menu) on the TreeView and the
currently selected Node is not on screen, it scrolls down/up to that Node
(setting the focus) and my context menu is not displayed.

I had a look at the Javascript functions in the treeview.htc file and had to
change a few lines to solve my problem. I changed the dofocus() function to
accept a boolean parameter(eg. dofocus(setFocus)). I then changed the
dofocus() call in the ondocumentready() function to supply a true parameter
so that the initial focus is set on the page load. In the dofocus() function,
I just do a check to see if the focus should be set on the element or not.

Does anyone know if there is another way of doing this or am I on the right
track? If so, I hope this will be in the next version of Webcontrols.

Kind Regards,
Chris van Renen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top