Attaching object to tabbar inside a window not working

Hello, I hope someone can help me with this.

I am testing this library and I’m stuck with this problem. I explained it.

I have create a window then after the window was created. I attach a toolbar. After attaching a toolbar I attach a tabbar which works fine. Here is the problem. When I attach an object to the tabbar nothing shows.

I did used this.

tabbar.tabs(id).attachObject(objectname)

the objectname exist inside that window. (I did check it again and it exist, yet it is not adding in the tabbar. The style of that objectname is this (style=“position:relative;width:100%;height:100%;overflow:auto”).

What’s wrong with this. I hope someone is still active and interested in this product. It’s promising.

Hi

what is objectname ? Should be like

Yes, the objectname is "

.

It is really odd. I used the recommended method for attaching components in the window.

I also tried creating a div example.

profile here....
profile here....

then I made the id the parent for the tabbar.

var _tab = _win.attachTabbar({
parent: “TABBAR__UID1453445335664_GEN”,
tabs:[
{id:“tab1”, text:“Profile”, active: true},
{id:“tab2”, text:“Settings”},
]
});

_tab.tabs(“tab1”).attachObject(“TABBAR__UID1453445335664_GEN_PROFILE”);
_tab.tabs(“tab1”).attachObject(“TABBAR__UID1453445335664_GEN_SETTINGS”);

Again, the tabbar is still empty.
I did used the attachHTMLString but I got problem with it when I create an Editor component inside the “TABBAR__UID1453445335664_GEN_PROFILE” div, maybe because I attach the div as string not as DOM Elem, so my option is using the attachObject, BTW appendObject is not working also same as the attachObject.

Hope I got a response from you soon sir. :slight_smile:

Hi

seems like you’re attaching both divs to same tab1. GEN_SETTINGS overwrite GEN_PROFILE.

Additional. The window is create inside a Layout (“1C”). I’m doing a multiple window so I use the layout to attach the main toolbar. I have a button labelled “create window” on that main tollbar and when you pressed that a unique generated window is created.

Please note I used the Object notation here it is more readable and less code :slight_smile:.

Inside that window I attach a toolbar using this code.
var _toolbar = _win.attachToolbar();
// more code here…

var _tab = _win.attachTabbar();
// more initiation code…

After creating the toolbar I attach a Tabbar, when I attach the Object nothing shows, the Tabs are working but empty.

I will add a Editor component inside the tabbars. BTW. I used setTimeout to set delay on creating the Editor components.Yet the Tabs has empty value so Editor is not yet created… :slight_smile:

Could you please provide us complete demo including all correspondnig js/css files?
Please also add information regarding current and expected behaviour.

Here is a small guide how to make a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html

If you don’t want to share your demo here for any reasons - you can send it to support@dhtmlx.com, if so - please include link to this forum topic.

If you’re using PRO Edition please send your demo to support@dhtmlx.com

This happens when adding more than two opbjects to a cell

appendObject and attachobject on dhtmllayout are not working propperly
The object is attached in the DOM but the height of the cellstais ‘0px’
After doing this : this.g_cell_a.cell.childNodes[3].style.height = ‘10000px’;
The object becomes visible,
But the Height resets to ‘0px’ after window resizing …

this.g_myLayout = new dhtmlXLayoutObject({parent: this.g_appData.g_document.getElementById(“id_htmlbody”),pattern: “1C”});
this.g_cell_a = this.g_myLayout.cells(‘a’);
this.g_cell_a.hideHeader();
this.g_myLayout.attachEvent(“onResizeFinish”, this.f_onresizelayout.bind(this), false);
this.g_menu_1 = this.g_cell_a.attachMenu();
this.g_menu_1.setIconsPath(this.g_dhtmlxVersion+’/imgs/’);
this.g_menu_1.loadStruct(’’);
this.g_menu_1.attachEvent(‘onClick’, this.f_clickMainMenu.bind(this), false);
this.g_ribbon_2 = this.g_cell_a.attachRibbon({icons_path : this.g_dhtmlxVersion+"/imgs/"});
this.g_myCellDiv = new PixelData_DIV(this.g_appData, ‘rootBody’, ‘100%’, ‘100%’, ‘0px’, ‘0px’, “#FF0000”);
this.g_cell_a.appendObject(this.g_myCellDiv.s_div());
// next line is needed to show the ‘this.g_myCellDiv’ object
this.g_cell_a.cell.childNodes[3].style.height = ‘10000px’;

Could you please provide us complete demo including all correspondnig js/css files?
Please also add information regarding current and expected behaviour.

Here is a small guide how to make a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html

If you don’t want to share your demo here for any reasons - you can send it to support@dhtmlx.com, if so - please include link to this forum topic.

If you’re using PRO Edition please send your demo to support@dhtmlx.com

Greetings,

This post is old and I had found what was the problem was about. Here is the example code of html mark up. Some might have this problem so I’ll answer this.

[code]

tab1 content
tab2 content

[/code]

It seems like I cannot attach the tab1 (div) into the already attached tabs in windows (“object not found”). What I did is that instead of attaching the tabbar in the window I created a tabbar instance using this

[code]

tab1 content
tab2 content
[/code]

it works…