Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Steve Schreiner on Oct 24, 2008 08:16
open dhtmlx forum
layout not resizing to its parent div

when using the layout I use the following div:

<div id="layoutPanel" style="background-color:green;position: relative; width:100%; height:600px;"></div>

and I initialize the layout this way:

var dhxLayoutMain = new dhtmlXLayoutObject("layoutPanel", "2U");

When I resize my browser, I can see that the layoutPanel div resizes to the browser, but the layout attached to it does not resize to the size of the div? Are there settings to tell the layout to resize to match the outer dimensions of the div that it is contained by?
Answer posted by Support on Oct 27, 2008 04:11
Layout doesn't resized to divs or any other elements. In your case div have width:100% - maybe this acts on browser behavior which partially inherits layout. dhtmlxLayout resized to browser only in case of fullscreened init.
Answer posted by Steve Schreiner on Oct 27, 2008 05:25
Hmmm....  I was hoping that would not be the answer.  This brings me back to another post of mine in that if I do the fullscreened init, I need to be able to hide a horizontal resize bar, because I would have to use the 3T layout and make my top panel fixed.  The horizonatl bar in this case looks strange and would not be functional
Answer posted by Support on Oct 27, 2008 05:55
There is no such possibility. Probably it will added in future release.
Answer posted by Steve Schreiner on Oct 27, 2008 05:55
There has to be a way to change the width of the overall layout.  I can monitor the browser width, and then maybe set the width of the overall layout to match?
Answer posted by Support on Oct 27, 2008 07:02
Layout does not support hiding resize bars. They could be without "resizer" image.
Here is a demo: http://dhtmlx.com/docs/products/dhtmlxLayout/samples/conf/fixsize.html?un=1225116231000
Automaticaly width changing available in Fullscreened Init mode.