Facility Control

 View Only
  • 1.  Popup in OGLML

    Posted 05-26-2016 16:36
    When I create a popup in an OGLML file, is there a way to run ogscript code if the user presses the "X" button that closes the popup? If not, is there a way to disable or hide the "X" control?

    Thanks!


  • 2.  RE: Popup in OGLML

    Posted 05-26-2016 17:55

    At the moment, no.
    If you need to do something to approximate a modal dialog box, I recommend that you do something like this (paste it at the bottom of your document, just before the :

    <table visible="true" bottom="0" id="ui-blocker" left="0" onmousedown="return;" right="0" style="bg#00000088;" top="0">
       <tr>
          <blank height="1" weighty="1.0" width="1"/>
       </tr>
       <tr>
          <blank height="1" weightx="1.0" width="1"/>
          <abs height="400" style="bdr:shadow;" width="500">
             <button bottom="9" height="50" left="4" name="Close!" right="8">
                <task>ogscript.hide('ui-blocker');</task>
             </button>
             <label height="60" left="2" name="Title Text!" right="5" style="txt-align:center;bg#selectbg;fg#selectfg;font:bold;size:Big;bdr:line;" top="1"/>
             <label height="171" left="39" name="Other stuff...." style="txt-align:west" top="117" width="420"/>
          </abs>
          <blank height="1" weightx="1.0" width="1"/>
       </tr>
       <tr>
          <blank height="1" weighty="1.0" width="1"/>
       </tr>
    </table>

    #DashBoard


  • 3.  RE: Popup in OGLML

    Posted 05-27-2016 15:51
    I'll give it a try.

    Thanks.
    #DashBoard


  • 4.  RE: Popup in OGLML

    Posted 08-10-2017 09:08

    Hi.

    If I would like to have a big custom-styled modal help box/screen when I hover over a button without clicking (like the tooltip in styling), how would I do that?
    I can catch the onmousemove event over a button with a ogscript attribute, but how would I catch the mouse off event so the modal would hide when hovering off the button?
    In this example I use a centered tab to overlay the GUI (with a blank tab when nothing is showed). Is this possible at all?

    <button buttontype="push" height="100" id="modaltestbutton" left="10" name="modaltestbutton" top="10" width="100">
    <task handles="onmousemove" tasktype="ogscript">ogscript.reveal("TabHelpModal" );</task>
    <task handles="onmouseoff???" tasktype="ogscript">ogscript.reveal("TabEmpty");</task>
    <task handles="onclick" tasktype="ogscript">theButtonActionScript();</ogscript>
    </button>

    #DashBoard


  • 5.  RE: Popup in OGLML

    Posted 08-10-2017 13:01
    Unfortunately, at present, ogScript does not expose onmouseenter or onmouseexit events.
    You may want to put a container around the and add an onmousemove listener to that - then, if the mouse moves on that container, hide your help box.
    #DashBoard


  • 6.  RE: Popup in OGLML

    Posted 08-10-2017 13:22
    Note: We are looking to expose these event handlers in an upcoming release of DashBoard. I can let you know when a beta is available.
    #DashBoard


  • 7.  RE: Popup in OGLML

    Posted 08-10-2017 13:34
    Thanks!
    The container will work as an 'off' event until a new version is available:)
    #DashBoard