openprocedure
openprocedure
PROCEDURE
,
OPTION
,
VALUE

The openprocedure statement opens a procedure in the current database in a new window.

Parameters

This statement has three parameters:

procedure – is the name of the procedure to open.

option – in addition to the form name, this statement can have one or more additional option/value parameter pairs that modify the operation of the statement. Each pair has two parts, the option name (this parameter) and the option value. See the discussion below for more information.

value – option value.

Description

This statement opens a procedure in a new window. If the specified procedure is already open, it is simply brought to the front.

By default, the procedure will open in the same location it was in the last time it was opened. To specify the size and location of the new window in advance, use the setwindowrectangle, setwindow, or windowbox statements.

The procedure below opens the procedure .CustomMenu in a 4 inch by 6 inch window centered on the main screen.

    local newWindowRect
    newWindowRect=rectanglecenter(
        info("screenrectangle"),
        rectanglesize(1,1,4*72,6*72))
    setwindowrectangle newWindowRect,""
    openprocedure ".CustomMenu"

#### Options

In addition to the procedure name, this statement can have one or more additional option/value parameter pairs that modify the operation of the statement. Each pair has two parts, the option name (this parameter) and the option value, like this:

    openprocedure name,option,value,option,value,option,value

The available options are described below.

#### Database

To open a procedure in a different database, use the `database` option. This example opens the procedure Print Report from the Members database.

    openprocedure "Print Report","Database","Members"

The specified database must already be open.

#### Rectangle

Panorama normally opens a procedure in the same location it was in the last time it was open. This option allows you to specify the exact location and size of the new procedure window. This example opens a 3“ by 5” procedure window in the upper left hand corner of the screen.

    openprocedure "Some Action","Rectangle",rectanglesize(20, 5, 72*3, 72*5)

Note: The location can also be specified with the setwindowrectangle statement. If both are used, the rectangle specified in the openprocedure statement will be used.

See Also

- activeobjectaction -- allows a procedure to communicate with the object on the current form that is currently being edited (if any).
- automaticprocedurename( -- returns an available procedure name.
- changeobject -- modifies the properties of one object in a form.
- changeobjects -- modifies the properties of one or more objects in a form.
- changetimer -- modifies a repeating task that will be performed periodically when Panorama is not otherwise busy.
- cloneform -- copies all of the objects in a form (optionally, with modifications) into the active form.
- cloneobjects -- duplicates objects in a form (with modifications).
- closeactiveobject -- closes any object whose text is currently being edited.
- closeclonewindow -- is an alternative method to close the current window, works even if the window has no close box.
- closedatabaseactiveobjects -- stops all text editing associated with the current database.
- 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.
- downloadpartialdatabase -- downloads specified components of the current database from the server. The current database must be shared.
- exportallprocedures -- saves all the procedures in an editable text format.
- exportprocedure( -- exports a procedure and the procedure's meta data as a binary object that can be imported with the importprocedure statement.
- formtodatamode -- switches the current form window to data mode.
- formtographicsmode -- switches the current form window to graphics mode.
- formxy -- programmatically scrolls a form to a new position.
- getmaxwindow -- retrieves the position and size of the of the largest possible window on the main screen.
- getprocedureoption( -- returns information about a procedure.
- getproceduretext -- gets the contents (source) of a procedure and places it in a variable.
- getproceduretext( -- gets the contents (source code) of a procedure.
- 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.
- Implicitly Triggered Procedures -- Procedures that are triggered automatically when the user performs some normal Panorama action are said to be "implicitly triggered."
- importdatabase -- imports data from another database into the current database.
- importdictprocedures -- converts source code exported by the ExportAllProcedures statement into a dictionary.
- importjson -- imports a JSON array into the current database.
- importjsonline -- imports a JSON record into the current record.
- importline -- imports a line of text into the current record.
- importprocedure -- imports a procedure into a database.
- importrawdata -- imports raw binary data into an existing database.
- importtext -- imports text into an existing database.
- 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("proceduredatabase") -- returns the name of the database that contains the currently running procedure.
- info("procedurename") -- returns the name of the currently running procedure.
- 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.
- join -- joins data from another database into the current database.
- joinonerecord -- joins matching data from another database into the current record.
- 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.
- loadallprocedures -- loads all the procedures from a dictionary into the current database. If a procedure doesn't exist it will be created.
- 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.
- makenewform -- creates a new form in the current database.
- makenewprocedure -- creates a new procedure in the current database.
- makesecret -- makes the current database disappear, while leaving it open in memory.
- Mark Menu -- allows you to set bookmarks in source code to help navigate to specific spots in a long program.
- newdatabase -- creates a new database.
- newformobject -- creates a new graphic object in a form.
- objectaction -- allows a procedure to communicate with an object on the current form.
- 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.
- 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.
- partialdatabaseupdate -- updates one or more components of an existing database.
- printonemultiple -- prints a form over and over again without advancing from record to record. Instead of advancing from record to record, a variable is incremented each time the form is printed. This statement is designed for printing calendars or thumbnails.
- printtopdf -- prints the current database to a PDF file.
- printusingform -- allows the current database to be printed using a different form than the one currently being displayed.
- procedureexists( -- checks to see whether a procedure exists or not.
- procedureinsertfieldname -- inserts a field name into a procedure, adding chevrons if necessary.
- procedureinsertformname -- inserts a form name into a procedure, adding quotes.
- procedureinsertprocedurename -- inserts a procedure name into a procedure, adding quotes if necessary.
- proceduresearch -- searches for text in a procedure.
- proceduresearchexact -- searches for text in a procedure.
- proceduresearchnext -- searches for text in a procedure, starting from the current location.
- proceduresearchnextexact -- searches for text in a procedure, starting from the current location.
- Program Menu -- assists with running and debugging code, and with developing custom dialogs.
- Programming -- basics of programming with Panorama X.
- recompile -- recompiles all procedures in a database.
- rememberwindow -- remembers the currently active window, so that you can get back to it later.
- saveallprocedures -- saves all the procedures in the specified database into a dictionary.
- saveoneprocedure -- saves a specific procedure in the specified database into a dictionary.
- saveopenprocedures -- saves all the open procedures in the specified database into a dictionary.
- savepartialdatabase -- saves specified components of the current database, leaving other components out.
- serverupdate -- temporarily disables record locking and server updates when using a shared database.
- setactivedatabase -- makes a database active (without changing the configuration of the windows).
- setprocedureoptions -- modifies one or more properties of a procedure (source code, Action menu options, etc.).
- setproceduretext -- changes the text of the currently open procedure.
- 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.
- Source Menu -- used to assist in editing program code.
- startbonjour -- starts monitoring the local network for available hosts.
- starttimer -- sets up and starts a repeating task that will be performed periodically when Panorama is not otherwise busy.
- stopbonjour -- cancels monitoring of the local network for available hosts.
- 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.
- windowinfo( -- returns information about an open window: its name, type, database, location, etc.
- 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.0 | No Change | Carried over from Panorama 6.0, but now includes options for opening forms from another database.