getformoption(
DATABASE
,
FORM
,
OPTION
)

The getformoption( function returns information about a form.


Parameters

This function has three parameters:

database – The database that contains the form you want information about, or "" for the current procedure.

form – The name of the form you want to get information about, or "" for the currently open form (if a form window is active).

option – The type of information you want to retrieve. See below for descriptions of each option. This parameter is optional, if left off the ALL option will be used.


Description

This function retrieves information about any form in any open database.

ALL

This option returns a dictionary that contains all of the option values associated with this form. You can extract individual options with the getdictionaryvalue( function. (You can also get this dictionary by simply omitting the option parameter.) This example displays all of the available information about a form.

local finfo
finfo = getformoption("","SomeForm")
message dumpdictionary(finfo)

POSITION and SIZE

The “windowleftedge”, “windowtopedge”, “windowrightedge” and “windowbottomedge” options return the saved dimensions of the form window (whether it is currently open or not). The “windowrectangle” function returns a rectangle with all four coordinates.

MINIMUM/MAXIMUM SIZE

The “minimumwidth”, “minimumheight”, “maximumwidth” and “maximumheight” options return the min max sizes that have been specified in the Form Properties panel, if any (if no value has been specified, these values will be zero).

BACKGROUNDCOLOR

This option returns the background color of the form (see Colors). The background color is usually white but can be set in the form Property Inspector, and can also be set with the formcolor and setformoptions statements.

TABORDER

This option returns the tab order of the specified form. The possible tab orders are:Natural, Data Sheet Order, and Back to Front.

VIEWMODE

This option returns the view mode of the specified form. The possible modes are: Individual Pages and View-as-List.

VARIABLETYPE

This option returns the default variable type created by objects in the specified form. The possible modes are: FileGlobal (the default), WindowGlobal, and Global.

ALLOWCLONES

This option returns true if the specified form can be opened in multiple windows.

USESERVERFORLOOKUP

This option returns true if lookups done by objects in the specified form query the server (for shared databases only).

EVENTCODE

This option returns the source code that has been set up (if any) for processing events related to the form (for example when the form opens, or is brought to the font). This code can use the info(“formevent”) function to determine what event just occured. (Note: The code can only handle events that occur while the form is in in data mode, not graphics mode. This code replaces the .OpenForm and .ActivateForm procedures in Panorama 6 and earlier.)

EVENTCODESYNTAXERROR

This option returns the syntax error message associated with the form’s event code (see above). Normally this option will return "", but if the source code contains a syntax error this option will return a non-blank value.

LASTTIMEWINDOWINFRONT

This option returns a superdate value (combined date and time) that indicates the last time this form was the active window.

TAG

This option returns the tag you have assigned to this form (if any). You can use the tag value for whatever you want, Panorama stores the tag for you but does not use or interpret it in any way.

NOTES

This option returns the notes you have assigned to this form (if any). You can use the notes for whatever you want, Panorama stores the notes for you but does not use or interpret them in any way.

OBJECTCOUNT

This option returns the number of objects in the specified form.


See Also


History

VersionStatusNotes
10.0NewThis function is new in this version.