DHTMLX Docs & Samples Explorer

### Position of the list

Method enableOptionAutoPositioning allows to place combo list depending on combo position. So if it's possible, a vertical scroll won't appear when a list with options is opened

Source

    <script>window.dhx_globalImgPath = "../../codebase/imgs/";</script>
    <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxcombo.css">
    <script  src="../../codebase/dhtmlxcommon.js"></script>
    <script  src="../../codebase/dhtmlxcombo.js"></script>
    <script src="../../codebase/ext/dhtmlxcombo_whp.js" type="text/javascript"></script>

    <table>
    <tr>
        <td rowspan="2">
            <iframe src="inc/frm1.html" width="300px" height="220px" style="border:3px outset red;"></iframe>
        </td>
        <td style="padding-left:20px" valign="top">
            <div id="combo_zone1" style="width:200px; height:30px;"></div>
        </td>
    </tr>
    <tr>
        <td style="padding-left:20px" valign="bottom">
            <div id="combo_zone3" style="width:200px; height:30px;"></div>
        </td>
    </tr>
    </table>
    <script>var z = new dhtmlXCombo("combo_zone1", "alfa2", 200);
    z.loadXML("../common/data_03_options.xml");
    z.enableOptionAutoPositioning();
    var z2 = new dhtmlXCombo("combo_zone3", "alfa2", 200);
    z2.loadXML("../common/data_03_options.xml");
    z2.enableOptionAutoPositioning();
    z2.enableOptionAutoHeight(1);</script>