X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 17 Jun 2008 10:04 AM by  anon
GUI "on exit": is it possible to create custom code?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
17 Jun 2008 10:04 AM
    Hello, I have some custom code in the event procedure for an Exit menu item in a GUI app. I would like to have the same custom code when the user closes the application via the 'X' located at the top right side of GUIs instead of the File->Exit. Is it possible to do something like that? Is there something like "on_exit" procedure I can modify? Thanks,

    Deleted User



    New Member


    Posts:
    New Member


    --
    17 Jun 2008 10:36 AM
    The WIDGET_BASE keyword setting "/TLB_KILL_REQUEST_EVENTS" insures that the 'X' button of the top-level base will issue a "WIDGET_KILL_REQUEST" event, rather than doing its default behavior of closing the window. Your event handler for the top-level base can then contain a conditional statement like: if tag_names(event, /STRUCTURE_NAME) eq $ 'WIDGET_KILL_REQUEST' then ...James Jones
    You are not authorized to post a reply.