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
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