Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sandip on Apr 14, 2009 02:53
open dhtmlx forum
Toolbar is shifting towards right in every reload

hi,

I am using layout and attach a toolbar. The situation is that in same toolbar location I have to display different toolbar according to the required need. So, I am using below customized code to remove the tool bar buttons...
---------------------------------------------------------------------------------------
this.MetaPropertyToolBarView.forEachItem(function(itemId)
{
    metapropertytoolbarViewObj.RemoveItemFromToolBar(itemId);
});

metaPropertyToolbarView.prototype.RemoveItemFromToolBar = function(itemId)
{
    this.MetaPropertyToolBarView.removeItem(itemId);
}
----------------------------------------------------------------------------------------
reloading different xml according as per need...
this.MetaPropertyToolBarView.loadXML("UserMetaProperties.xml");
this.MetaPropertyToolBarView.loadXML("DomainMetaProperties.xml");
this.MetaPropertyToolBarView.loadXML("UserCosMetaProperties.xml");
this.MetaPropertyToolBarView.loadXML("GroupMetaProperties.xml");
----------------------------------------------------------------------------------------

But, the problem comes when I reload the toolbar(any one of the above)... The buttons are shifting towards the right in each and every reload of it...
Where is the problem. How I can insure the starting position of toolbar buttons...

Plz help...
thanx
sandip
Answer posted by Alex (support) on Apr 14, 2009 03:47

Hello,

Try to use the following approach after deleting all buttons.

...

this.MetaPropertyToolBarView.tr.removeChild(this.MetaPropertyToolBarView.tr.childNodes[0]);

It must resolve the problem.

Answer posted by sandip on Apr 14, 2009 04:36
thanx, its working :)