The setformoptions statement modifies one or more properties of a form (name, viewing mode, etc.).


This statement has four parameters:

database – The database that contains the form you want to modify, or "" for the currently active database.

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

option – The type of information you want to modify. See below for descriptions of each option. The option can be specified in either upper or lower case.

value – The new value for this option.


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

Note: You can specify multiple option/value pairs in a single setformoptions statement, like this:

setformoptions database,form,option1,value1,option2,value2,option3,value3


This option changes the name of the specified form. This example changes the name of the form Report to Year End Report.

setformoptions "","Report","NAME","Year End Report"

The database must not already contain a form with the new name. If it does, the setformoptions statement will stop with an error.


This option moves the form to a new position in the list of forms. This is primarily useful for changing the order in which forms appear in the View Menu.

This example moves the Invoice form so that it appears before the Shipping Label form.

setformoptions "","Invoice","POSITION","Shipping Label"

Use "" to move a form to the end of the list, like this:

setformoptions "","Data Entry","POSITION",""


This option deletes the specified form.

setformoptions "","Top Secret","DELETE",""

Notice that even though the option value is not used, you must still supply it.


This option sets 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 statement. A formula can access the background color with either the info(“formcolor”) or getformoption( functions.


This option changes the view mode of the form, it may be either Individual Pages or View-as-List.


This option specifies whether there should be a border line between rows of a view-as-list form. The options are None, Solid and Dashed.

setformoptions "","","viewaslistgridstyle","solid"


This option specifies whether the rows in a view-as-list form are displayed with alternating background colors. The parameter must be a Boolean value (0, –1, true(), false(), “yes”, “no”, “true”, “false”).

setformoptions "","Product Info","alternatingbackgroundcolors","yes"

Note: If the entire surface of the data tile is covered with objects, the background color will not be visible.


This option specifies custom alternating background colors. This is a comma separated separated list of RGB colors in HTML format. You can specify 1, 2, 3 or more colors.

setformoptions "","Info","viewaslistbackgroundcolors","ffeeff,ffffee"

Leave this option empty ("") if you want to use the standard background colors.


In a view-as-list form the selected record is normally displayed with a blue highlight. Use this option to customize the highlight color. This exammple sets the highlight color to red.

setformoptions "","","viewaslisthighlightcolor","ff0000"


This option changes the tab mode of the form, it may be either Natural, Data Sheet Order or Back to Front.


This option specifies the type of variable that will be created by objects on the form that need variables, it may be either Global, FileGlobal or WindowGlobal. This example changes this option for the current form (however, the change won’t take effect until the form is closed and re-opened, or for any new objects that are created.)

setformoptions "","","variabletype","windowglobal"


This option specifies the number of columns when a report is printed (usually used for mailing labels). The default is Automatic, in which case the number of columns will be determined by the paper width and the width of the data tile. This option can also be set to 1 column, 2 columns, 3 columns or 4 columns.


When printing multiple columns (for example mailing labels), this option specifies whether records will be printed down the page (Down) or from left to right (Across). The default is Down.


This option specifies whether objects that contain lookup( functions will perform the lookup on the server or the local client (this option is ignored for non-shared databasers). The parameter must be a Boolean value (0, –1, true(), false(), “yes”, “no”, “true”, “false”).

setformoptions "","Product Info","useServerForLookup","yes"


This option sets up the source code that will be used for processing events related to the form (for example when the form opens, or is brought to the front). This code can use the info(“formevent”) function to determine what event just occurred. (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.)


This option assigns a tag 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.


This option assigns notes to this form. 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.


There are four options for setting the minimum and maximum size of the form window. This example sets the minimum height for an invoice form at 4 inches, the max height at 7 inches, and the minimum width at 500 points.

setformoptions "","Invoice",

Last Opened Position and Size

Panorama keeps track of the position and size of the window the last time it was open. You can change this with the windowtopedge, windowleftedge, windowheight and windowwidth options, though we generally would not recommend that since it will surprise the user if the form opens in a different position. Note that if the form is currently open, changing these settings will not have any effect, and in fact Panorama will overwrite the values you set with the actual window position and size.


Panorama normally keeps track of this value itself, but you can override it with this option. The parameter must be a superdate (see the superdate( function. This example tricks Panorama into thinking that the current form hasn’t been used for 24 hours (keep in mind that this value will be updated the next time this form is opened.)

setformoptions "","","lastTimeWindowInFront",superdate(supernow()) - 60*60*24

See Also


10.0NewThis statement is new in this version.