Hi!
I am working with a Layout. Inside one cell I have a tabbar. Inside the tabbar I have inserted a toolbar and a tree. I have used methods “attachX” for all of them, but I have a little problem.
t works perfectly in Firefox and Chrome but the tree is not painted in IE9. If I remove the toolbar, the tree is perfectly painted, but when I add the toolbar, the tree disappears until I click on the horizontal resizable bar. If instead a tree I paint a grid, I have the same problem.
Did it happened to any of you? Any help would be great… Thank you in advance…
I have add my components this way:
leftTabbar=myLayout.cells("a").attachTabbar();
leftTabbar.setImagePath("includes/tabbar/imgs/");
leftTabbar.setSkin('dhx_skyblue');
leftTabbar.setHrefMode("ajax-html");
leftTabbar.addTab('devices',"Device", '100px' );
leftTabbar.addTab('clients',"Clients, '100px' );
leftTabbar.enableAutoSize(true);
leftTabbar.enableAutoReSize(true,true);
var leftToolBar=leftTabbar.cells('devices').attachToolbar();
leftToolBar.setSkin("dhx_blue");
leftToolBar.setIconsPath("includes/toolbar/imgs/");
leftToolBar.addButton("addDevice",0,'Device', 'device-add.png', 'device-add.png');
leftToolBar.setItemToolTip("addDevice", "AddDevice");
leftToolBar.addButton("addGroup",1,'AddGroup', 'group-add.png', 'group-add.png');
leftToolBar.setItemToolTip("addGroup", "AddGroup");
leftToolBar.attachEvent("onClick", doOnClickLeftToolBar);
tree=leftTabbar.cells('devices').attachTree("root");
tree.setImagePath("includes/tree/imgs/");
tree.enableDragAndDrop(true);
tree.enableDragAndDropScrolling(true);
tree.enableHighlighting(true);
tree.setXMLAutoLoading("getDevicesGroups.jsp");
tree.loadXML("getDevicesGroups.jsp?id=-1");
tree.attachEvent("onDblClick", function(id){
tree.focusItem(id);
showDetail(id);
});
tree.attachEvent("onClick", treeOnClick);
tree.setDragHandler(dragHandler);
Hi guys!
I have been checking the issue I commented above.
I have discovered that probably the problem is related with the tabbar which is not resized when the toolbar is added.
I mean: I have a tabbar with a fix height. If I just add a tree, the tree perfectly fits inside the tabbar space. But when I add the toolbar , the tree is shifted down out of the tabbar space, so I can´t see the whole tree.
Does anyone know how can I control it? How can i resize the tabbar height when I add the toolbar? Or how can I fit the height of the tree and the toolbar to the tabbar height?
Any help would be perfect. Thank you very much!
If tabbar is attached to layout cell, you should not use enableAutoSize and enableAutoReSize - tabbar occupies the layout cell.
How can i resize the tabbar height when I add the toolbar?
Tabbar can not be resized - it resizes automatically with layout cell.
Thank you for your reply Alexandra. It worked, but I had to make a trick. I had to use a div inside the tabbar where I inserted the tree, and later on, add the div a fixed height. And now, it seems to work. Thank you!
leftTabbar=myLayout.cells("a").attachTabbar();
leftTabbar.setImagePath("includes/tabbar/imgs/");
leftTabbar.setSkin('dhx_skyblue');
leftTabbar.setHrefMode("ajax-html");
leftTabbar.addTab('devices',"<%=(String) getBundleObject("devices")%>", '100px' );
leftTabbar.addTab('clients',"<%=(String) getBundleObject("clients")%>", '100px' );
var leftToolBar=leftTabbar.cells('devices').attachToolbar();
leftToolBar.setSkin("dhx_blue");
leftToolBar.setIconsPath("includes/toolbar/imgs/");
leftToolBar.addButton("addDevice",0,'<%=(String) getBundleObject("addDevice")%>', 'device-add.png', 'device-add.png');
leftToolBar.setItemToolTip("addDevice", "<%=(String) getBundleObject("addDeviceTip")%>");
leftToolBar.addButton("addGroup",1,'<%=(String) getBundleObject("addGroup")%>', 'group-add.png', 'group-add.png');
leftToolBar.setItemToolTip("addGroup", "<%=(String) getBundleObject("addGroupTip")%>");
leftToolBar.attachEvent("onClick", doOnClickLeftToolBar);
[u] leftTabbar.cells('devices').attachObject("tree_zone");
tree = new dhtmlXTreeObject("tree_zone","100%","100%","root");[/u]
tree.setImagePath("includes/tree/imgs/");
tree.enableDragAndDrop(true);
tree.enableDragAndDropScrolling(true);
tree.enableHighlighting(true);
tree.setXMLAutoLoading("getDevicesGroups.jsp");