Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Alberto on Dec 17, 2008 04:11
open dhtmlx forum
new patterns in dhtmlxlayout

Can I create a new pattern like "4E"?

we have simulated it qith 2E+2E, but we have obtained 2 independent areas to collapse and expand cells.

thanks.
Answer posted by Support on Dec 17, 2008 04:21
Edit the dhtmlxlayout.js:

this.tplData = {
    ...
    // add
    "4E": '<layout><autosize hor="b;c;d" ver="a;d" rows="3" cols="2"/><row><cell obj="a" a_width="*" resize="hor" neighbors="a;b,c,d" rowspan="5"/><cell sep="ver" left="a" right="b,c,d" dblclick="a" rowspan="5"/><cell obj="b" a_height="*" resize="ver" neighbors="b;c;d"/></row><row sep="yes"><cell sep="hor" top="b" bottom="c;d" dblclick="b"/></row><row><cell obj="c" b_height="*" resize="ver" neighbors="b;c;d"/></row><row sep="yes"><cell sep="hor" top="b;c" bottom="d" dblclick="c"/></row><row><cell obj="d" c_height="*" resize="ver" neighbors="b;c;d"/></row></layout>';

this._availAutoSize = {
    ...
    // add
    "4E_hor": new Array("a", "b;c;d"),
    "4D_ver": new Array("a", "b", "c;d")
Answer posted by Alberto on Dec 17, 2008 04:37
It isn't our aim, we obtain 4 panels in 2 columns and we need 4 panels in 1 column.
Answer posted by Support on Dec 17, 2008 05:08
Could you please a picture?
Answer posted by Alberto on Dec 17, 2008 06:37
here is it
Attachments (1)
paneles.JPG16.00 Kb
Answer posted by Support on Dec 17, 2008 07:27
Try this:

    "4E": '<layout><autosize hor="a;b;c;d" ver="d" rows="4" cols="1"/><row><cell obj="a" resize="ver" neighbors="a;b;c;d"/></row><row sep="yes"><cell sep="hor" top="a" bottom="b;c;d" dblclick="a"/></row><row><cell obj="b" resize="ver" neighbors="a;b;c;d"/></row><row sep="yes"><cell sep="hor" top="a;b" bottom="c;d" dblclick="b"/></row><row><cell obj="c" resize="ver" neighbors="a;b;c;d"/></row><row sep="yes"><cell sep="hor" top="a;b;c" bottom="d" dblclick="c"/></row><row><cell obj="d" resize="ver" neighbors="a;b;c;d"/></row></layout>'

    "4E_hor": new Array("a;b;c;d")
    "4E_ver": new Array("a", "b", "c", "d")

Answer posted by Alberto on Dec 17, 2008 07:39
It's great!! thank you.