windowinfo(
windowinfo(
TITLE
,
PROPERTY
)

The windowinfo( function returns information about an open window: its name, type, database, location, etc.

Parameters

This function has two parameters:

title – The title of the window you want information about, or the window ID number (if numeric, see Window ID Numbers). If this parameter is blank, or omitted, the function will return information about the current window.

property – the type of information (name, type, etc.) to return. See below for details.

Description

This function returns information about an open window: its name, type, database, location, etc. This example returns the type of an open window (data sheet, form or procedure).

    windowinfo("Mailing List:5160 Label","Type") ☞ Form

If the first parameter is numeric, it specifies the window ID number instead of the window name.

    windowinfo(4,"Form") ☞ 5160 Label

Normally you would never specify the window ID number with a constant value like this, instead you would get it from a function: info(“windownumber”), getformoption(, getprocedureoption( etc. See Window ID Numbers to learn about formulas for accessing window ID numbers.

### Window Properties

An open window has almost a dozen different properties. The windowinfo( function can return any one of these, or it can return a dictionary with all of them.

#### ALL

If you specify `ALL` (or omit the property) the windowinfo( function will return a dictionary that contains all of the properties listed below (except for the rectangle property). You can extract individual properties with the getdictionaryvalue( function or you can convert the entire dictionary to text with the dumpdictionary( or dumpdictionaryquoted( function. Here is a typical example:

    dumpdictionary(windowinfo("Fruit Database:Nutrition Information"))

The output from this formula will look something like this:

    DATABASE=Fruit Database
    VARIABLES=
    OPTIONS=NoHorzScroll NoVertScroll
    TYPE=Form
    LASTTIMEINFRONT=3504361211
    NAME=Fruit Database:Nutrition Information
    PROCEDURE=
    FORM=Nutrition Information

#### Database

This property is the database associated with the window.

    windowinfo("Mailing List:5160 Label","Database") ☞ Mailing List

You may think this property is obvious from the window title, but remember that the windowname statement can be used to change the window title to a name that doesn’t contain the database name. In that case, the windowinfo( function can be used to determine the actual database name.

#### Type

This property determines the type of view associated with the window – either Data Sheet, Form, Draw, or Procedure.

    windowinfo("Mailing List","Type") ☞ Data Sheet
    windowinfo("Mailing List:5160","Type") ☞ Form

#### Form, Procedure and View

These properties determine the name of any form or procedure associated with the window. If you just want the name and don’t care if it is a form or a procedure, use the View property, otherwise use either Form or Procedure for these specific types of views.

    windowinfo("Mailing List:5160 Label","Form") ☞ 5160 Label
    windowinfo("Mailing List:5160 Label","Procedure") ☞
    windowinfo("Mailing List:5160 Label","View") ☞ 5160 Label

#### Clone

This property will be true if the current window was opened as a “clone” window. See OpenForm (which has a clone option), OpenDialog, RunDialog and OpenCloneWindow.

#### Closeable

This property is true if the window can be closed. If false, the window can’t be closed (the red close circle will be gray, and the Close Window command in the File menu will be disabled). If you want to close a window that is not closeable, you must first make it closeable using the setwindowoptions statement.

#### Name

This property returns the name of the window. This really only makes sense if you leave the window name empty – otherwise you are just repeating back the name you already know!

    windowinfo("","Name") ☞ Mailing List:5160 Label

Note: Another way to get the current window name is to use the info(“windowname”) function.

#### Rectangle

This property is the location and size of the window. This example calculates the height (in points) of the current window.

    rheight(windowinfo("","Rectangle")) ☞ 186

#### ToolBar

This property is true if the window’s toolbar is visible, false if it is hidden.

#### VerticalScrollBar

This property is true if the window’s vertical scrollbar is enabled, false if it is disabled.

#### HorizontalScrollBar

This property is true if the window’s horizontal scrollbar is enabled, false if it is disabled.

#### Options

This property returns the names of any currently enabled window options. The available options are: notoolbar, novertscroll, and nohorzscroll. If the Mailing List:5160 Label doesn’t have scroll bars, the result would look like this:

    windowinfo("Mailing List:5160 Label","Options") ☞ novertscroll nohorzscroll

#### Variables

This property returns the names of any windowglobal variables associated with the window as a carriage return delimited list.

#### LastTimeInFront

This property returns the last time this window was brought to the front. This number is an integer superdate (which includes both the date and time).

    superdatestr(windowinfo("Mailing List:5160","LastTimeInFront")) ☞ 1/17/15 5:35 PM

See the superdate( function for more information about handling superdates.

See Also

- closeclonewindow -- is an alternative method to close the current window, works even if the window has no close box.
- closedialog -- closes a form window that was previously opened with the opendialog statement.
- closewindow -- closes the current window.
- datafocus -- makes sure that Panorama is focused on data, not on a property panel.
- formtodatamode -- switches the current form window to data mode.
- formtographicsmode -- switches the current form window to graphics mode.
- getmaxwindow -- retrieves the position and size of the of the largest possible window on the main screen.
- getwindow -- retrieves the position and size of the current window.
- goform -- switches the current window to a different form.
- hideaccessorypanel -- closes the current window's accessory panel.
- info("accessorypanelisopen") -- returns the status of the current window's accessory panel, if any.
- info("accessorypanelwidth") -- returns the current width of the current window's accessory panel, if any.
- info("clickedwindownumber") -- returns the window number of that was just clicked.
- info("clonewindow") -- returns true if the current window was opened as a "clone" window.
- info("datasheetwindownumbers") -- returns the unique ID numbers of all open data sheet windows.
- info("datasheetwindows") -- returns a carriage return separated list of all open Data Sheet windows.
- info("dialogsheet") -- returns true if the currently active window is a dialog sheet.
- info("dropwindownumber") -- returns the number of the window that contains the form data was dropped on.
- info("formwindownumbers") -- returns the unique ID numbers of all open form windows.
- info("formwindows") -- returns a carriage return separated list of all open form windows.
- info("horizontalscrollbar") -- returns true if the current window's horizontal scrollbar is enabled, false if it is disabled.
- info("magicwindow") -- returns the name of the currently designated "magic window," if any.
- info("procedurewindownumbers") -- returns the unique ID numbers of all open procedure windows.
- info("procedurewindows") -- returns a carriage return separated list of all open procedure windows.
- info("toolbar") -- returns true if the current window's toolbar is visible, false if it is hidden.
- info("toolbarvisible") -- returns true if the current window has a visible tool bar.
- info("typeofwindow") -- determines what type of view the current window contains.
- info("verticalscrollbar") -- returns true if the current window's vertical scrollbar is enabled, false if it is disabled.
- info("windowdepth") -- returns the color depth of the current window.
- info("windowname") -- returns the name of the current window.
- info("windownumber") -- returns the unique ID number of the current window.
- info("windownumbers") -- returns the unique ID numbers of all open windows.
- info("windowoptions") -- returns the names of any currently enabled window options,
- info("windowrectangle") -- returns a rectangle defining the edges of the current window. The rectangle is in screen relative coordinates.
- info("windows") -- builds a carriage return separated text array containing a list of all the currently open windows.
- info("windowtype") -- returns a numeric value based on what type of view the current window contains.
- info("windowvariables") -- returns a carriage return separated text array listing the windowglobal variables defined for the current window.
- info("windowview") -- determines what type of view the current window contains.
- listwindownumbers( -- builds a text array containing a list of window ID numbers for all the open windows associated with a particular file.
- listwindows( -- builds a text array containing a list of all the open windows associated with a particular file.
- magicformwindow -- designates an open window as the temporary active window for the purposes of info( functions and graphic statements.
- magicwindow -- designates an open window as the temporary active window for the purposes of info( functions and graphic statements.
- makesecret -- makes the current database disappear, while leaving it open in memory.
- openclonewindow -- opens a clone of the current window.
- opendialog -- opens a form from the current database as a modal dialog box.
- opendialogsheet -- opens a form from the current database as a sheet dialog (attached to the current window).
- openform -- opens a form in the current database in a new window.
- openprocedure -- opens a procedure in the current database in a new window.
- opensavedwindows -- opens windows that were open the last time file was saved.
- opensheet -- opens the data sheet window for the current database in a new window.
- originalwindow -- goes back to the window remembered by the RememberWindow statement.
- rememberwindow -- remembers the currently active window, so that you can get back to it later.
- setactivedatabase -- makes a database active (without changing the configuration of the windows).
- setwindow -- specifies the dimensions (size and location) of the next window that is opened (with openform, opensheet, openprocedure etc.).
- setwindowoptions -- changes the attributes of the current window (tool bar, scroll bars, etc.).
- setwindowrectangle -- specifies the dimensions of the next window that is opened by a procedure.
- showaccessorypanel -- opens the current window's accessory panel.
- showrecordcounter -- forces Panorama to redisplay the record counter in all windows in the current database.
- showrectangle -- refreshes all or part of the current form window.
- size -- changes the data sheet text size.
- toggleaccessorypanel -- opens and closes the current window's accessory panel.
- topdatawindow -- brings the topmost data window in the specified database to the front.
- updatingwindow( -- returns true if in a formula that is being displayed on a form, otherwise false.
- views( -- lists views in open databases.
- window -- brings a Panorama window to the front. It can also open a "secret" invisible window.
- Window ID Numbers -- ID numbers for identifying windows.
- windowbox -- specifies the dimensions (size and location) of the next window that is opened (with openform, opensheet, openprocedure etc.).
- windowcornerinitialize -- shifts a window to an edge or corner of the main screen.
- windowname -- changes the name of the current window.
- windowtoback -- sends a Panorama window to the back, behind all other windows (including non-Panorama windows).
- windowtocorner -- shifts a window to an edge or corner of the main screen.
- zoomalign -- moves the current window to one of 9 positions on the computer's primary screen: *top left, top center, top right*, etc.
- zoomwindow -- moves (*"zooms"*) the current window to a new position and size.
- zoomwindowrectangle -- modifies the size, location, and options of the current window.

History

Version | Status | Notes
10.2 | Updated | Now allows the window to be specified by name or by ID number.
10.0 | New | New in this version.