Facility Control

 View Only
  • 1.  Set scrollbar to bottom...

    Posted 07-28-2018 19:57
    This one kinda jumped at me out of nowhere... So, sure I can sort things ascending or descending, but what if I want to have the "oldest" on top, and the "newest" entry at the bottom.
    And example would be a log. Is there any way to go about making sure this parameter with a vertical scroll is allways at the bottom after an update/entry into the log?


  • 2.  RE: Set scrollbar to bottom...

    Posted 07-29-2018 09:19
    Could you get the length/number of indexes and then select the last index after an update to the log?
    #DashBoard


  • 3.  RE: Set scrollbar to bottom...

    Posted 07-30-2018 15:46

    Right now, there is no simple way to place the scroll bar in a text field. Doing the table approach is likely to be your easiest mechanism. Using the w.scrollselection will cause the table to automatically scroll to the selected row.

    Here's an example of how it might work:

    <abs contexttype="opengear">
       <meta>
          <params>
             <param access="1" maxlength="0" name="Column 1" oid="params.col1" precision="0" type="STRING_ARRAY" widget="default">
                <value>Element 1</value>
                <value>Element 2</value>
             </param>
             <param access="1" constrainttype="STRING_CHOICE" name="Table" oid="params.table" precision="0" type="INT16" value="1" widget="table">
                <constraint>params.col1</constraint>
             </param>
          </params>
       </meta>
       <param expand="true" height="411" left="11" oid="params.table" showlabel="false" top="16" width="434">
          <config key="w.rowheight">50</config>
          <config key="w.scrollselection">true</config>
       </param>
       <button buttontype="push" height="49" left="455" name="Insert" top="14" width="162">
          <task tasktype="ogscript">var eCount = params.getElementCount('params.col1');
    params.setValue('params.col1', eCount, 'Element ' + (eCount + 1));
    params.setValue('params.table', 0, eCount);</task>
       </button>
    </abs>

    #DashBoard