info("formevent")
info("formevent")

The info(“formevent”) function returns the last event that occurred to the current form.

Description

This function returns the last event that occured to the current form. This function should only be used in code that has been set up to process form events. This code can be set up in the Form Properties Panel of the Object Inspector Panel, or can be set up via a procedure with the setformoptions statement.

The possible events that can be returned by this function are:

OPEN – The window has just been opened.

FRONT – The window has just been brought to the front (this event also happens when the form is opened).

RESIZE – The window has just been resized (this event also happens when the form is opened).

GRAPHICSMODE – The window has just switched from data mode into graphics mode.

DATAMODE – The window has just switched from data mode into graphics mode.

This example is useful for debugging – it displays a notification whenever any form event occurs.

    nsnotify "Form Event: "+info("formevent"),"Text",info("formname")

This example sets up a variable when the form is first opened.

    if info("formevent") match "open"
        windowglobal windowOpenTime
        windowOpenTime = supernow()
    endif

IMPORTANT: Starting with Panorama X 10.2, this function is now superceded by the ability to set up specific labels for each type of form event. Using labels instead of the info(“formevent”) function will make your application significantely faster. To learn how, see Form Event Procedures on the Implicitly Triggered Procedures page.

See Also

- getformoption( -- returns information about a form.
- Implicitly Triggered Procedures -- Procedures that are triggered automatically when the user performs some normal Panorama action are said to be "implicitly triggered."
- setformoptions -- modifies one or more properties of a form (name, viewing mode, etc.).

History

Version | Status | Notes
10.2 | Updated | This function is now obsolete (though it still works). Use code labels instead.
10.0 | New | New in this version.