Folks,
Is it possible to use percentages to set the width and height of a layout’s cells? For example:
var layout = new dhtmlXLayoutObject(“target-div”, “2U”);
layout.cells(“a”).setWidth(“50%”);
layout.cells(“a”).setHeight(“100%”);
Thanks,
Daryl
Folks,
Is it possible to use percentages to set the width and height of a layout’s cells? For example:
var layout = new dhtmlXLayoutObject(“target-div”, “2U”);
layout.cells(“a”).setWidth(“50%”);
layout.cells(“a”).setHeight(“100%”);
Thanks,
Daryl
Hi
It is impossible to use it such way, but you can count manually necessary size and put it as a parameter.
I got same problem, and here is my workaround:
var layout = new dhtmlXLayoutObject(“target-div”, “2U”);
layout.attachEvent(“onResizeFinish”, function(){
var w=0;
layout.forEachItem(function(item){
w+=item.getWidth();
});
layout.cells(“a”).setWidth(w*0.3);
});
It keeps the cells(“a”) width as 30% of the whole layout width.
FGAONET,
Thanks for the tip, it’s much appreciated. I will give it a try.
Regards,
Daryl