Facility Control

 View Only
  • 1.  Button Rows

    Posted 21 days ago

    Hi
    Using the code sample here, is there a clean simple way to break the created buttons into 6 columns by 2 rows. I've tried adding the "columns:6" to the style but it just seems to ignore that formatting. I'm also want to keep the result value to a single variable ... Here is the code I'm trying:

    <abs contexttype="opengear" id="_top" keepalive="false">
       <meta>
          <params>
             <param access="1" constrainttype="INT_CHOICE" name="ButtonPick" oid="ButtonPick" precision="0" type="INT32" value="1">
                <constraint key="1">1</constraint>
                <constraint key="2">2</constraint>
                <constraint key="3">3</constraint>
                <constraint key="4">4</constraint>
                <constraint key="5">5</constraint>
                <constraint key="6">6</constraint>
                <constraint key="7">7</constraint>
                <constraint key="8">8</constraint>
                <constraint key="9">9</constraint>
                <constraint key="10">10</constraint>
                <constraint key="11">11</constraint>
                <constraint key="12">12</constraint>
             </param>
          </params>
       </meta>

       <param expand="true" height="50" left="1317" oid="ButtonPick" style="style:toggleButton;columns:6;" top="83" widget="radio-toggle" width="435"/>
    </abs>

    TIA



    ------------------------------
    JerryB
    ------------------------------



  • 2.  RE: Button Rows

    Posted 19 days ago

    You need to put your parameter into a container of some kind - containers can change the layout of the components inside. We have grids, tables, tabs, border layouts, wrapping 'flow' layouts,  and more.  For your specific requirement, a "simplegrid" with 6 columns makes the most sense:

    <abs contexttype="opengear" id="_top" keepalive="false">
       <meta>
          <params>
             <param access="1" constrainttype="INT_CHOICE" name="ButtonPick" oid="ButtonPick" precision="0" type="INT32" value="1">
                <constraint key="1">1</constraint>
                <constraint key="2">2</constraint>
                <constraint key="3">3</constraint>
                <constraint key="4">4</constraint>
                <constraint key="5">5</constraint>
                <constraint key="6">6</constraint>
                <constraint key="7">7</constraint>
                <constraint key="8">8</constraint>
                <constraint key="9">9</constraint>
                <constraint key="10">10</constraint>
                <constraint key="11">11</constraint>
                <constraint key="12">12</constraint>
             </param>
          </params>
       </meta>
       <simplegrid cols="6" height="100" left="1317" top="83" width="435">
          <param expand="true" oid="ButtonPick" style="style:toggleButton;" widget="radio-toggle"/>
       </simplegrid>
    </abs>
    


    ------------------------------
    James Peltzer
    Ross Video
    ------------------------------



  • 3.  RE: Button Rows

    Posted 19 days ago

    James,
    Works perfectly for my needs and thanks for the lesson as well (it has me re-thinking a lot of other instances).



    ------------------------------
    JerryB
    ------------------------------