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


History

VersionStatusNotes
10.2UpdatedThis function is now obsolete (though it still works). Use code labels instead.
10.0NewNew in this version.