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”, “windowwidth” and “windowheight” options return the saved dimensions of the form window (whether it is currently open or not). The “windowrectangle” option returns a rectangle with all four coordinates.

INITIALDIMENSIONS

This property returns the initial dimensions of the form when it is opened with the View Menu or simply by opening the database. The format of this option is either top,left,height,width or height,width (all dimensions are specified in points). See setformoptions and Newly Opened Database Window Arrangement to learn more. (If this property is empty, the form will open in whatever position it was in the last time it was closed.)

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).

EXCLUDEFROMVIEWMENU

If this option is false, the form is displayed in the View menu. If this option is true, the form will be excluded from the View menu.

WINDOWOPTIONS

This option returns a space delimited list of disabled options. The possible options are NoToolBar, NoHorzScroll and NoVertScroll. If toolbars and scroll bars are all enabled, this option will return empty text ("").

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.

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.

Window Options

The following options return information about the window associated with the specified form (if there is an open window).

WINDOWNAME

If the window for this form is open, this option returns the name of the window (if not open, returns empty text).

WINDOWNUMBER

If the window for this form is open, this option returns the ID number of the window (if not open, returns zero). See Window ID Numbers to learn more about using this option.

CLONEWINDOWNAMES

If one or more clones of this form have been opened (see OpenForm), this function will return the names of the windows containing the clones. The names are returned as a carriage return separated text array.

CLONEWINDOWNUMBERS

If one or more clones of this form have been opened (see OpenForm), this function will return the ID numbers of the windows containing the clones. The numbers are converted to text and then returned as a carriage return separated text array.


See Also


History

VersionStatusNotes
10.2NewNew options excludefromviewmenu, windowname, windownumber, clonewindownames and clonewindownumbers.
10.0NewThis function is new in this version.