Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jeroen van Gijzel on Oct 31, 2008 09:01
open dhtmlx forum
Min height problem

Hi,

I'm using the DTHMLX Layout component. The layout i choose was "3T", it has a "top, left and right-cell". The top-cell will contain an DHTMLX Menu component, the problem i'm experiencing is that a "layout-cell" has a minimum height of 40px. The top cell is larger then the menu so an empty space will stay open.
Answer posted by Support on Oct 31, 2008 09:09
Hello,

you can attach menu without adding extra cell, just use 2U pattern and dhxLayout.attachMenu() method, like this:
http://dhtmlx.com/docs/products/dhtmlxLayout/samples/global/menu.html?un=1225469531000
Answer posted by Jeroen van Gijzel on Nov 03, 2008 03:48

Hi,

I've attached a Layout-object to the body-tag because i want the layout to be fullscreen whit a menu bar on top of it. When the window resizes the layout has to fit the window.

This i the code i am using

<script>
var dhxLayout = new dhtmlXLayoutObject(document.body, "2U");

//var menu = new dhxLayout.attachMenu();
var menu = dhxLayout.attachMenu(dhxLayout);
//initializing with script
menu.addNewSibling(null, "file", "File", false);
menu.addNewChild("file", 0, "file_new", "New", false, "new.gif");
menu.setHotKey("file_new", "Ctrl+N");
</script>

But for some reason the menu doesn't appear. Here's a link to my script:

http://cms.ontwikkel.webdesigntilburg.nl/grid/

Answer posted by Support on Nov 03, 2008 04:43
Hello,

You should include one more file into index.html:
<script src="dhtmlxWindows/codebase/ext/dhtmlxwindows_wmn.js"></script>
Answer posted by Jeroen van Gijzel on Nov 03, 2008 04:56

Thank you :-)

It works now, thanks for your fast support