Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael on Sep 15, 2009 15:32
open dhtmlx forum
using DhtmlxTree with DhtmlxTabbar - tabbar hides part of tree

We just bought the latest version of the commercial suite. We have a tabbar with two tabs on a page. One of the tabs contains a dhtmlxTree that is dynamically loaded. Sometimes the text loaded into tree nodes is too long and rather than the tabbar resizing to display all the contents of the tree, or the tree node wrapping, it just hides part of the node without providing a horizontal scrollbar.

is there a way to get the tabbar content area to auto resize, or to render a horizontal scrollbar if the contents of the tree are two wide to display?

Thanks,
Michael
Answer posted by Alex (support) on Sep 16, 2009 03:00

Hello, 

what approach do you use to attach tree to the tab? You can try to use attachTree method.

Please, take a look at the sample in the tabbar package: dhtmlxTabbar/samples/05_components/02_tree_inside.html

Answer posted by Michael on Sep 17, 2009 10:45
I am testing using the attachTree and attachEditor functions to add my components to the tab to solve the resize issue per your recommendations.  Can I mix other content with items that are attached through these functions?  You see, I have a bunch of other elements - input boxes, dropdowns (select), labels, buttons, text that I need to have in the div - besides the tree, and in fact to make everything look nice, the tree is located inside a certain <td> element.  How do I get all this content into the div, structured correctly, along with the tree, using the attachTree function? 

Thanks,
Michael
Answer posted by Michael on Sep 17, 2009 10:56
I am testing using the attachTree and attachEditor functions to add my components to the tab to solve the resize issue per your recommendations.  Can I mix other content with items that are attached through these functions?  You see, I have a bunch of other elements - input boxes, dropdowns (select), labels, buttons, text that I need to have in the div - besides the tree, and in fact to make everything look nice, the tree is located inside a certain <td> element.  How do I get all this content into the div, structured correctly, along with the tree, using the attachTree function? 

Thanks,
Michael
Answer posted by Michael on Sep 17, 2009 11:04
Also, I can get the editor by itself to attach to a tab using the attachEditor(); function, but if i try to attach an editor to one tab and a tree to the other, then when i switch between the tabs i get the javascript error:

Error: this.editor._prepareContent is not a function
Source File: file:///E:/Documents%20and%20Settings/Michael/Desktop/alex/dhtmlxtabbar/codebase/dhtmlxcontainer.js
Line: 8

I've attached the source.  I am using the editor, tree, toolbar and tabbar components - their directories are siblings of my files tree.xml and tabbar2.html

Thanks,
Michael


Attachments (1)
tree.zip1.66 Kb
Answer posted by Alex (support) on Sep 18, 2009 07:22

>> then when i switch between the tabs i get the javascript error:

there issue wasn't reproduced locally. The complete demo is attached

>>  Can I mix other content with items that are attached through these functions? 

You can place layout into the tab. And attach the necessary elements to layout cells:

http://dhtmlx.com/docs/products/dhtmlxTabbar/samples/05_components/03_layout_inside.html

http://www.dhtmlx.com/docs/products/dhtmlxLayout/samples/04_components/01_tree.html

Attachments (1)
tree.zip104.89 Kb