Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Raymond on Sep 22, 2008 04:44
open dhtmlx forum
Tabbar scrollbar - state is shared between tabs

I notice in your Documentation/Samples application that if you expand the tree nodes, in the Documentation tab, sufficiently enough to force the vertical and horizontal scrollbar to appear and then scroll down to the bottom of the tree you will see the same scrollbars and be at the same position after you switch to the Samples tab. It would appear that both (all) tabs are sharing the same scrollbar state and position.

Is there anyway for each tab to have its own state?
Answer posted on Sep 23, 2008 00:36
Sure, each tab has its own scrollbar. THere is no real tab contnet in Docs&Samples - clicking on tab you just call function which changes the contnet of the tree. The scrollbar you see is a scrollbar of the tree.
Answer posted by Raymond on Sep 23, 2008 03:18
Sure I agree that the tabbar control is a container for two trees:
  1. tree=new dhtmlXTreeObject("doctree_box","100%","100%",0);
  2. tree_smpl=new dhtmlXTreeObject("smpltree_box","100%","100%",0);
However, the behaviour of the scrollbar (as first raised) suggests that both trees share the same scrollbar - this is not a desirable feature. The scrollbar should be, for each tree, indicative of position in the tree and the amount of tree expansion.
Answer posted by Raymond on Sep 26, 2008 02:44
Please refer to the attached rar file. This file contains examples of dhtmlxTree that demonstrate the incorrect behaviour of tree APIs when trees are embedded in dhtmlxTab.
tree_single.html - correct behaviour of scrollbar, find and keyboard navigation
tree_tabbed.html - demonstrates the incorrect behaviour of scrollbar, find and keyboard navigation. This example also fails to set focus in parent.tree
Attachments (1)
dhTree.rar281.75 Kb