1 Reply Latest reply on Nov 21, 2009 3:19 PM by Joe ... Ward

    Quick NativeWindow questions.

    JSayani Level 1

      Hi,

       

      Two Quick Questions about native window actions (I am using AIR with HTML and JS):

       

      1. How do you "refer" to minimize button ? - So, when a user clicks minimize, it should do an action defined in javascript.

       

      2. How to define click event for System tray icon ? - So I can display something when my system tray icon is double-clicked.

       

      Thanks.

        • 1. Re: Quick NativeWindow questions.
          Joe ... Ward Level 4

          1. Add an event listener to the window.nativeWindow object, listening for the NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING  or DISPLAY_STATE_CHANGE events.

           

          2. Add an event listener to your SystemTrayIcon object. You can listen for click, mouseUp or mouseDown events, but doubleClick events are not dispatched by this object.