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 form you want to modify, or "" for the currently open form (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 controls whether the tool bar and scroll bars are enabled or disabled. The possible options are NoToolBar, NoHorzScroll and NoVertScroll. For example, this code removes the scroll bars but leaves the tool bar enabled.

setformoptions "","Data Entry","WINDOWOPTIONS","NoVertScroll NoHorzScroll"

To enable both toolbars and scroll bars (the default appearance), this option should be set to empty text ("").


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.


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


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


If specified, the initial dimensions will be used when opening the form (in that case the last opened position is ignored). The format of this option is either top,left,height,width or height,width (all dimensions are specified in points). This example will set the initial dimensions of the Label form to a height of 2 inches (2*72 points) and a width of 4 inches (4*72 points).

setformoptions "","Label","initialdimensions","144,288"

The next time this form is opened (with the View Menu or simply by opening the database) it will open at its last position, but with dimensions of 2 by 4 inches.

This example will set the initial dimensions of Order Form to 800 points high by 500 points wide, in the upper left corner (30 points down from the top of the screen, and 10 points from the left edge).

setformoptions "","Order Form","initialdimensions","30,10,800,500"

If the form is opened with the openform statement, the initial dimensions can be overridden by using the rectangle option.

openform "Order Form","rectangle",rectanglesize(24,2,700,300)

If this property is empty, the form will open in whatever position it was in the last time it was closed.

setformoptions "","Order Form","initialdimensions",""

Note: The initial dimensions can also be set with the Initial Dimensions form property. See Newly Opened Database Window Arrangement to learn more.


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",supernow() - 60*60*24

See Also


10.2NewNew option excludefromviewmenu.
10.0NewThis statement is new in this version.