The WINDOW object (more commonly referred to as a Form) is the core object type used to build an OpenInsight desktop user interface. It represents a visual surface on which other GUI controls (such as EditLines, Listboxes, Checkboxes and so on) are placed and arranged which allow the user to interact with an application. {{500__window_object_image_1.png?326x310}}{{500__window_object_image_2.png?326x310}} ====== Developer Notes ====== - Forms support an IMAGE sub-object which is used to specify their background image. - Forms support a MENU sub-object as an interface to the form’s menu bar (if present). ====== WINDOW Properties ====== The WINDOW object supports the following properties in addition to the Common GUI Object and Container Object properties, except where noted below: ^Name ^Description ^ |ACCELERATORFORM |Specifies the name of form that menu accelerator keystrokes on the current form are redirected to. | |ACTIVE |Specifies if the form is active. | |ALLOWFORMSTATEEVENTS|Specifies if a form triggers the FORMSTATECHANGED and MDICHILDSTATECHANGED events. | |ALLOWSELFLOCKS |Specifies if a data-bound form ignores locks placed on the same record. | |ALLOWSEQKEYRESET |Specifies if a user is allowed to reset a data-bound form's sequential key counter. | |ARRANGEICONS |Specifies if an MDI Frame form automatically arranges its minimized MDI child forms. | |ATRECORD |Gets or sets data associated with the primary table of a data-bound form and updates data-bound controls. | |AUTOCOMPOSITED |Specifies if the form uses system double-buffering during sizing operations. | |COMMONLIST |Returns a list of attached labelled common areas. | |COMMUTERMODULE |Contains the name of the stored procedure used to handle events for the specified form. | |CTRLMAP |Returns a list of controls hosted by the specified form. | |DESTROYFLAG |Specifies if the form is flagged for destruction during SYSTEM QUERYEND processing. | |DPI |Returns the current DPI (dots-per-inch) setting for the specified form. | |DWMANIMATION |Specifies if the form uses Desktop Window Managet (DWM) animations. | |FIRSTFOCUS |Returns the name of the first control that receives the input focus when the specified form is created. | |FORMBORDERSTYLE |Specifies the border style of a form. | |GOTFOCUSCONTROL |Returns the last control on the form with a GOTFOCUS event handler that had the input focus. | |HELPBUTTON |Specifies if a help button is displayed on a form's caption bar. | |HIDEEFFECT |Specifies the animation used with a form's HIDE method. | |ICON |Specifies the name of the icon displayed in the form's caption bar. | |ID |Returns the current row key associated with the primary table data-row in a data-bound form. | |INITIALFOCUS |Returns the control that receives the input focus when the specified form is activated. | |INITIALPOSITION |Specifies the starting location of the specified form. | |IOOPTIONS |Specifies the data-binding options for a form. | |LOADPREVALWAYS |Specifies if the form's PREVROWVAL property is updated during a read operation as well as a write operation. | |LOCKCOORDINATION |Specifies if table-lock coordination is used by the form in conjunction with record locking. | |LOCKTYPE |Specifies the type of row locking used by a form. | |MAXIMIZEBUTTON |Specifies if a maximize button is displayed on a form's caption bar. | |MDIACTIVE |Activates an MDI child form or returns the name of the currently active MDI child form for the specified MDI frame form.| |MDIFRAME |Returns the name of the parent MDI frame form for the specified MDI child form. | |MINIMIZEBUTTON |Specifies if a maximize button is displayed on a form's caption bar. | |MULTIINSTANCE |Specifies if multiple instances of the same form may be executed in the same session at runtime. | |NEWROW |Returns TRUE$ if the specified form has loaded a new (blank) data row. | |NOACTIVATE |Prevents a top-level window becoming the foreground window when the user clicks it. | |NOCLEARONWRITE |Specifies if a data bound form clears its contents after a successful write operation. | |NUMERICCOMPARE |Specifies the type of comparison the form write operation uses to determine if a column needs updating. | |OVERLAYICON |Specifies a small icon that may be used to overlay the normal icon on a form's taskbar button. | |OWNER |Gets or sets the owner of the specified form. | |PLACEMENTDATA |Get or sets the show state and the restored, minimized, and maximized positions of the specified form. | |PREVROWVAL |Returns the values that were held in the specified form's controls for a previously loaded data row. | |PROGRESSSTATE |Sets the state of the current progress information on the specified form's taskbar button. | |PROGRESSVALUE |Displays progress information on the specified form's taskbar button. | |QBFLIST |Gets or sets the list of data keys used by the current QBF (Query-By-Form) session for the specified form. | |QBFPOS |Gets or sets the index of the row to display when the specified form has a valid QBFLIST loaded. | |QBFSTATUS |Returns the status of the QBF session for the specified form. | |QBFREADMODE |Specifies if a form triggers the READ event when loading data during QBF processing. | |RECORD |Gets or sets the cached copy of the data row associated with the specified form. | |REQUIREONWRITE |Specifies when a form performs "required data" checks. | |RESTORESIZE |Returns the position and size of the specified form in its non-maximized/minimized state. | |ROW |Gets or sets data associated with the primary table of a data-bound form and updates data-bound controls. | |ROWLOCKED |Returns TRUE$ if the form has loaded and locked a data row. | |SAVEWARN |Specifies if a data-bound form contains changed data that has not been saved. | |SCALEFACTOR |Specifies the custom magnification factor for a form. | |SCALEUNITS |Specifies how size and position coordinates are interpreted by a form. | |SHOWCAPTION |Specifies if a form displays a caption bar. | |SHOWEFFECT |Gets or sets the animation used with the SHOW method for the specified form. | |SIZINGMODE |Specifies if a form can resized with the mouse, | |STATUSLINE |Identifies the control that receives "status" messages from stored procedures when the specified form is active. | |STYLESHEEET |Specifies the name of a form to use as a "styling template" when adding controls to a form at design-time. | |SUPPRESSSAVEWARN |Specifies if a data-bound form checks the SAVEWARN property before clearing its contents or closing. | |SYSTEMMENU |Specifies if a "System Menu" is allowed for the specified form. | |TABLE |Returns the name of the primary table that the specified form is bound to. | |TASKBARBUTTON |Returns a flag denoting if Windows has created a taskbar button for the specified form. | |TASKBARID |Specifies a text string used to group or ungroup forms on the Windows taskbar. | |TRACKINGSIZE |Specifies the minimum and maximum sizes that a user may resize a form to. | |TRANSLUCENCY |Specifies the degree of transparency applied to a form when it is painted. | |TOPMOST |Specifies if the form appears above all other non-TOPMOST forms in the system z-order. | |VISIBLE |Specifies if a form is visible, hidden, maximized, or minimized. | |WRITEATRECORD |Specifies how data set with the ATRECORD property is saved during a write operation. | |WRITEMODE |Specifies how data set with the ROW property is saved during a write operation. | The following Common GUI Object properties are not supported: * ALLPAGES * AUTOSCALE * AUTOSIZEHEIGHT * AUTOSIZEWIDTH * BOTTOMANCHOR * COLUMN * CONV * DEFPROP * DEFPROPPOS * DEFPOSPROPID * DEFPROPRAW * DEFVALUE * DESIGNSELECTED * ECHO * EDGESTYLE * FORECOLOR * GOTFOCUSVALUE * IMAGELIST * INVALUE * NEXT * ORIGARRAY * ORIGLABEL * ORIGLIST * ORIGVALUE * PAGENUMBER * PART * POS * PREVIOUS * REQUIRED * RIGHTANCHOR * VALID * VALIDMSG ===== ACCELERATORFORM property ===== === Description === Gets or sets the name of a different form (with a menu) to redirect menu accelerator keystrokes to when they are detected on the current form. === Property Value === This is string value containing the name of a running form instance. When an accelerator keystroke is detected for the current form it is sent to the other nominated form instance for processing. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get/Set |No |No |No | === Remarks === This property is useful for owned/child forms (e.g. dialog boxes) which traditionally do not have their own menu. Rather than creating and duplicating a hidden menu themselves (for common functions like Help and Options) they can simply redirect the accelerator keystrokes to their parent for processing instead. === Example === // Example - in the CREATE event of a dialog box redirect the accelerator // // keystrokes to the parent form.// ParentForm = Get_Property( CtrlEntID, "PARENT" ) Call Set_Property_Only( CtrlEntID, "ACCELERATORFORM", ParentForm ) === See Also === MENU object. ===== ACTIVE property ===== === Description === Specifies if the form is active – i.e. if it is the top-level form that the user is currently working with. === Property Value === This is a boolean value. It returns TRUE$ if the form is the active form, or FALSE$ otherwise. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get |No |No |No | === Remarks === This property is updated during the WM_ACTIVATE window message processing. Please see the Microsoft website for more information on this message and on the topic of Keyboard Focus and Activation. === Example === // Example – Determine if the current form is the active form.// IsActive = Get_Property( @Window, "ACTIVE" ) === See Also === SYSTEM FOCUS property, WINDOW ACTIVATED event, WINDOW INACTIVATED event. ===== ALLOWSELFLOCKS property ===== === Description === Specifies if a data-bound form ignores locks placed on the same row if it is loaded into other forms in the same PS instance at the same time. === Property Value === This is a boolean value. It returns TRUE$ if the form ignores "self-locks", or FALSE$ otherwise. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get |No |No |Yes | === Remarks === When a row is read into a form the system checks to see if it can place an exclusive lock on it first. If it cannot, the default behavior is to display a message to the user, warning them that they can view a read-only version of a row or abort the read attempt. If the ALLOWSELFLOCKS property is TRUE$ and the exclusive lock attempt fails, then no warning will be shown if the lock is held by //another form in the current PS instance// – in this case the row will be loaded and editing allowed as normal. This facility is intended to allow forms to edit different parts of the same row at the same time without a locking conflict. For this activity to be safe forms that use this property //must// ensure that their controls do not bind to the same columns on different forms, otherwise this may result in unexpected data integrity issues due to the possibility of overwriting updates from other forms containing the same row. === Example === // Example – Determine if the current form is allowing self-locks// AllowSelfLocks = Get_Property( @Window, "ALLOWSELFLOCKS" ) === See Also === WINDOW IOOPTIONS property, WINDOW READROW method, WINDOW READ event. ===== ALLOWFORMSTATEEVENTS property ===== === Description === Specifies if a form triggers the FORMSTATECHANGED and MDICHILDSTATECHANGED events. === Property Value === This is a boolean value. It returns TRUE$ if the form triggers the events, or FALSE$ otherwise. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get |No |No |Yes | === Remarks === This property is FALSE$ for existing forms and must be enabled "manually" to preserve backwards compatibility. It is set to TRUE$ by default for new forms. === Example === // Example – Determine if the current form is allowing "FormState" events// AllowFormStateEvents = Get_Property( @Window, "ALLOWFORMSTATEEVENTS" ) === See Also === WINDOW IOOPTIONS property, WINDOW FORMSTATECHANGED event WINDOW MDICHILDSTATECHANGED event. ===== ALLOWSEQKEYRESET property ===== === Description === Specifies if the user can reset the sequential key counter for a data-bound form by entering a "=" character in the control bound to the key column. === Property Value === This is a boolean value. It returns TRUE$ if the user is allowed to reset the sequential key counter, or FALSE$ otherwise. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get/Set |No |No |Yes | === Remarks === This property only applies to forms bound to a single table with a numeric single part key. When a user enters a "=" character in the control bound to the key column they are presented with the option of setting the sequential key counter for the table to a new value. By default the sequential key it stored in the “%SK%” record in the dictionary table, but a different record may be chosen via the DEFVALUE property. If the sequential key has not been initialized before it defaults to a value of “1”. === Example === // Example – Determine if the current form is allowing a sequential key reset// AllowSeqKeyReset = Get_Property( @Window, "ALLOWFSEQKEYRESET" ) === See Also === Common GUI DEFVALUE property, WINDOW IOOPTIONS property. ===== ARRANGEICONS property ===== === Description === Specifies if an MDI Frame form automatically arranges its minimized MDI child forms. It does not affect MDI child forms that are not minimized. === Property Value === This is a boolean value. Set to TRUE$ to if an MDI Frame automatically arranges its minimized MDI child forms, or FALSE$ otherwise. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get/Set |No |No |No | === Remarks === In Windows 3.1 minimized MDI Child forms were represented as icons in the MDI client area. From Windows 95 onwards they appear as small caption bars instead, but the term "icons" is till used to refer to them in this context. Minimized MDI child forms are auto-arranged under the following circumstances: * When the MDI Frame is resized. * When an MDI child is activated or resized. * When this property is first set to TRUE$. This property uses the WM_MDIICONARRANGE window message internally. Please see the Microsoft website for more information on this message and on the topic of Windows MDI programming. === Example === // Example – Set the current form to auto arrange its MDI child icons.// PrevVal = Set_Property( @Window, "ARRANGEICONS", TRUE$ ) === See Also === WINDOW MDIICONARRANGE method, WINDOW ARRANGEICONS event, Appendix E – MDI Programming. ===== ATRECORD property ===== === Description === Gets or sets data associated with the primary table of a data-bound form and updates data-bound controls. When getting the property, the data is extracted directly from the controls on the form and merged with a cached version of the data row that was read from disk during the READ event (i.e. the RECORD property). When setting the ATRECORD property, the passed data row is set as per the form's RECORD property and then the data-bound controls are automatically populated from this. The SAVEWARN property is also set to TRUE$. === Property Value === This property is a dynamic array that represents a database row for the primary table bound to the form. Its structure is determined by dictionary of the table. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get/Set |No |No |Yes | === Remarks === By default the WRITE event of a form only updates the columns in the database table that are bound directly to controls on the form – //any data columns that are not bound to a control are ignored by the write processor//. This means that you cannot update these non-control columns using ATRECORD //unless// the form's WRITEMODE property is set to "WriteEntireRow" - in this case the entire data row held in the RECORD property is updated with the contents of the bound controls and is then written to disk. The intent behind the default of only updating bound controls is to prevent data corruption in cases where different forms load different columns from the same row at runtime. If each form updated the non-bound columns during the write process it would be possible to overwrite new data with stale data. The WRITEMODE property allows this safety feature to be circumvented, but it expects to be used with forms that do not use different columns with the same data row. (Note: This property was designed to emulate the functionality of setting the @Record variable for a data-bound form in an Advanced Revelation application which would automatically populate the data-bound prompts on screen.) This property is considered deprecated in favor of the ROW property. New applications should use ROW to work with the cached version of the data row for more consistent and expected results when using a "single form – single row" model. === Example === // Example - a table has five columns:// //// // CUST_ID (key)// // TITLE <1>// // FORENAME <2>// // SURNAME <3>// // DATE_OF_BIRTH <4>// //// // It is bound to a form that has the following three controls:// //// // EDL_CUST_ID -> CUST_ID (key)// // EDL_FORENAME -> FORENAME// // EDL_SURNAME -> SURNAME// //// // The form is loaded with record "C1234" which has the following data:// // // // <1> MR// // <2> REN// // <3> HOEK// // <4> 65478// //// // Enter "STIMPSON J" in EDL_FORENAME// AtRecord = Get_Property( @Window, "ATRECORD" ) // AtRecord contains:// // <1> MR// // <2> STIMPSON J// // <3> HOEK// // <4> 65478// AtRecord<1> = "SIR" AtRecord<3> = "CAT" Call Set_Property_Only( @Window, "ATRECORD", AtRecord ) Call Exec_Method( @Window, "WRITEROW" ) // If we were to look at the record stored in the table we would now see this:// //// // <1> MR <-- Not "SIR"!// // <2> STIMPSON J// // <3> CAT// // <4> 65478// //// // Because the TITLE column (field <1>) is not bound to a control on the form// // the value set by ATRECORD in field <1> ("SIR") does NOT get written unless// // the WRITEATRECORD property is set to TRUE$.// === See Also === WINDOW RECORD property, WINDOW ROW property, WINDOW SAVEWARN property, WINDOW WRITEATRECORD property, WINDOW WRITEENTIREROW property, WINDOW READROW method, WINDOW WRITEROW method, WINDOW READ event, WINDOW WRITE event. ===== AUTOCOMPOSITED property ===== === Description === Specifies if the form uses system double-buffering during sizing operations to achieve smoother rendering. === Property Value === This is a boolean value. When set to TRUE$ the WS_EX_COMPOSITED extended window style is applied to the form during a resize operation and then removed afterwards, === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get/Set |No |No |No | === Remarks === Results of using this property may vary depending on whether Windows is using the Desktop Window Manger (DWM) for rendering. If the DWM is active (i.e. on Windows Vista/7 running full Aero, or Windows 8 onwards) then using this property may actually degrade the rendering operation. === Example === // Example – set AUTOCOMPOSITED for the current form.// Call Set_Property_Only( @Window, "AUTOCOMPOSITED", TRUE$ ) === See Also === Common GUI COMPOSITED property. ===== COMMONLIST property ===== === Description === Returns a list of attached labelled commons. These commons are freed by the form when it is destroyed. === Property Value === This is an @fm-delimited array of labelled common names. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get |No |No |Yes | === Remarks === N/a. === Example === // Example – get the list of attached labelled common areas// CommonList = Get_Property( @Window, "COMMONLIST" ) === See Also === WINDOW ATTACHCOMMON method, WINDOW DETACHCOMMON method, End_Window Stored Procedure. ===== COMMUTERMODULE property ===== === Description === Returns the name of a stored procedure that contains event handling code for the form. === Property Value === This is a string value containing the name of a valid stored procedure (Note this is //not// a fully qualified STPROCEXE repository ID). === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get |No |No |Yes | === Remarks === The contents of this property are used by the QuickEvent processor to call a stored procedure to pass the event parameters onto at runtime. The QuickEvent processor replaces the token "@COMMUTER" in the event handler definition with the stored procedure name and then invokes it: {{500__window_object_image_3.png?295x182}} === Example === // Example – get the name of the current form's commuter module// CommuterModule = Get_Property( @Window, "COMMUTERMODULE" ) === See Also === Appendix XXX – Event processing. ===== CTRLMAP property ===== === Description === Returns a list of controls hosted by the specified form. === Property Value === This an @Fm-delimited array of fully-qualified control names. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get |No |No |Yes | === Remarks === The list returned by this control is the list that is compiled into the form template by the Form Designer, and subsequently used to create the form at runtime. If controls are later added to the form at runtime by using the SYSTEM CREATE method this list will not be updated. It can be updated "manually" by a developer by manipulating the form's "Window Common Area" if desired. If a control is destroyed using the SYSTEM DESTROY method there is an optional flag that will remove the control from this list. The list is held in the form's Window Common Area in the ControlMap@ variable which can be accessed by using the OIWIN_COMM_INIT insert record. === Example === // Example – get the list of controls for the current form// CtrlMap = Get_Property( CtrlEntID, "CTRLMAP" ) === See Also === SYSTEM CREATE method, SYSTEM DESTROY method, SYSTEM OBJECTLIST method, OIWIN_COMM_INIT insert record. ===== DESTROYFLAG property ===== === Description === Specifies if the form is flagged for destruction during QUERYEND processing. === Property Value === This is a boolean value. When TRUE$ this means that the form has been marked for destruction during a QUERYEND process. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get |No |No |No | === Remarks === When the SYSTEM QUERYEND property returns TRUE$, forms that are destroyed will have DESTROYFLAG set, but the forms themselves will not be destroyed. Often, the HANDLE property is used to test if a form still exists, but if a form is closed (by using End_Window for example) when QUERYEND is true, the HANDLE will still exist but DESTROYFLAG will be set. In earlier versions of OpenInsight this property was called DESTROY_FLAG. This name is deprecated but can still be used. === Example === // Test to see if the current form is flagged for destruction// IsFlagged = Get_Property( @Window, "DESTROYFLAG" ) === See Also === Common GUI HANDLE property, SYSTEM QUERYEND property. ===== DPI property ===== === Description === Returns the current DPI (dots-per-inch) settings for the specified form. === Property Value === This property is an @Fm-delimited array containing the DPI values:
=== Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get |No |No |No | === Remarks === This property returns the DPI for the monitor that the top-level parent form is currently displayed on, or that the majority of the form is displayed on if using more than one monitor. Beginning with Windows 8.1 individual monitors can have their own DPI settings - prior to this the form DPI is always the same as the SYSTEM DPI property. The form DPI is combined with its SCALEFACTOR property when calculating scaling attributes. === Example === // Get the DPI settings for the current control// CtrlDPI = Get_Property( ctrlEntID, "DPI" ) === See also === Common GUI DPI property, SYSTEM DPI property, WINDOW SCALEFACTOR property, WINDOW SCALED event, Appendix K – High-DPI Programming. ===== DWMANIMATION property ===== === Description === Specifies if the form uses Desktop Window Manager (DWM) animations when being displayed. === Property Value === This is a boolean property. If TRUE$ then DWM animations are enabled, or FALSE$ if they are disabled. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get/Set |No |No |No | === Remarks === This property is only effective when Windows is using the DWM for rendering, i.e. on Windows Vista/7 running full Aero, or Windows 8 onwards. The property implements the DWMWA_TRANSITIONS_FORCEDISABLED attribute of the DwmGetWindowAttribute and DwmSetWindowAttribute Windows API functions. Please see the Microsoft website for further information on these functions. === Example === // Example –turn off DWM animations for the current window.// Call Set_Property_Only( @Window, "DWMANIMATION", FALSE$ ) === See Also === N/a. ===== FIRSTFOCUS property ===== === Description === Returns the name of the first control that receives the input focus when the specified form is created. === Property Value === This is a string value containing the fully qualified name of a control, or null if no controls on the form could accept the input focus. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get |No |No |No | === Remarks === When a form is created the Presentation Server scans through its controls in tab-order looking for the first control that can accept the input focus. This property returns the name of that control. === Example === // Example – get the first control for the current form.// FocusCtrl = Get_Property( @Window, "FIRSTFOCUS" ) === See Also === Common GUI FOCUS property, SYSTEM FOCUS property, WINDOW GOTFOCUSCONTROL property, WINDOW INITIALFOCUS property. ===== FORMBORDERSTYLE property ===== === Description === Gets or sets the border style of the form. === Property Value === This in integer value that specifies the appearance and behavior of a form's border. It can be one of the following: ^//Value//^//Name// ^//Description// ^ |0 |None |The form has no border and cannot have a caption bar or be resized by the user. | |1 |Fixed |The form has a thin border and cannot be resized by the user. | |2 |Sizeable |The form has a normal border and can be resized by the user. | |3 |Dialog |The form has a normal border but cannot be resized by the user. | |4 |FixedTool |The form has a normal border with a thinner caption bar but cannot be resized by the user.| |5 |SizeableTool|The form has a normal border with a thinner caption bar and can be resized by the user. | Note that the "Tool" styles also have the following restrictions: * Minimize, maximize and help buttons are not allowed. * Tool-style forms do not appear on the Windows taskbar. * Tool-style forms will not display an icon. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get/Set |No |No |No | === Remarks === The descriptions of the various border styles given above can vary depending on the current Windows visual style. For example, on Windows 10 all borders are a single pixel wide and the Tool form styles have the same caption bar height as the other styles. The differences in earlier versions of Windows were more pronounced. Equated constants for this property can be found in the PS_WINDOW_EQUATES insert record. === Example === // Example – set current form's border style to "none".// $Insert PS_Window_Equates PrevStyle = Set_Property( @Window, "FORMBORDERSTYLE", PS_FORMBORDERSTYLE_NONE$ ) === See Also === WINDOW HELPBUTTON property, WINDOW ICON property, WINDOW MAXIMIZEBUTTON property, WINDOW MINIMIZEBUTTON property, WINDOW SHOWCAPTION property, WINDOW SIZINGMODE property, WINDOW SYSTEMMENU property, WINDOW TASKBARID property. ===== GOTFOCUSCONTROL property ===== === Description === Returns the last control on the form with a GOTFOCUS event handler that had the input focus. === Property Value === This is a string value containing the fully qualified name of a control, or null if no controls on the form with a GOTFOCUS event handler have had the input focus yet. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get |No |No |No | === Remarks === N/a. === Example === // Example – get the last control on the current form with a GOTFOCUS handler that// // had the input focus// GotFocusCtrl = Get_Property( @Window, "GOTFOCUSCONTROL" ) === See Also === Common GUI FOCUS property, SYSTEM FOCUS property, WINDOW FIRSTFOCUS, WINDOW INITIALFOCUS property. ===== HELPBUTTON property ===== === Description === Specifies if a help button is displayed on the form's caption bar. {{500__window_object_image_4.png?335x46}} === Property Value === This is a boolean value. It returns TRUE$ if a button should be displayed, or FALSE$ otherwise. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get/Set |No |No |No | === Remarks === When the help button is clicked the cursor changes to an arrow with a question mark. Clicking on an object with this cursor will trigger a HELP event for the object. A help button can only be displayed if the follow criteria are met: * The form has a caption bar. * The form does not have a minimize or maximize button in its caption bar. * The form does not have one of the "tool" styles set for its FORMBORDERSTYLE property. This property implements the WS_EX_CONTEXTHELP extended window style. Please see the Microsoft website for more details. === Example === // Example – Show a help button on the form's caption bar// Call Set_Property_Only( @Window, "HELPBUTTON", TRUE$ ) === See Also === WINDOW FORMBORDERSTYLE property, WINDOW MAXIMIZEBUTTON property, WINDOW MINIMIZEBUTTON property, WINDOW SHOWCAPTION property, Common GUI HELP event. ===== HIDEEFFECT property ===== === Description === Gets or sets the animation used with the HIDE method for the specified form. === Property Value === This is an integer value that can be one of the following: ^//Value//^//Name// ^//Description// ^ |0 |None |No animation effect when hidden. This is the default. | |1 |Fade |The form fades until is no longer visible. | |2 |Slide down |The form's top edge slides down to its bottom edge until the form is no longer visible. | |3 |Slide up |The form's bottom edge slides up to its top edge until the form is no longer visible. | |4 |Slide right |The form's left edge slides to its right edge until it the form is no longer visible. | |5 |Slide left |The form's right edge moves to its left edge until the form is no longer visible. | |6 |Slide down and right|The form's top-left corner slides down to its bottom-right corner until the form is no longer visible.| |7 |Slide down and left |The form's top-right corner slides down to the bottom-left corner until the form is no longer visible.| |8 |Slide up and right |The form's bottom-left corner slides up to its top-right corner until the form is no longer visible. | |9 |Slide up and left |The form's bottom-right corner slides up to its top-left corner until the form is no longer visible. | === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get/Set |No |No |No | === Remarks === This property does not apply when used with an MDI Child form. Equated constants for the HIDEEFFECT property value can be found in the PS_WINDOW_EQUATES insert record. === Example === // Example - set the HIDEEFFECT to "Slide Up" and hide the form// $Insert PS_Window_Equates Call Set_Property_Only( @Window, "HIDEEFFECT", PS_SHE_SLIDE_UP$ ) Call Exec_Method( @Window, "HIDE" ) === See Also === WINDOW SHOWEFFECT property, WINDOW TRANSLUCENCY property, WINDOW VISIBLE property, WINDOW HIDE method, WINDOW SHOW method. ===== ICON property ===== === Description === Specifies the name of the icon displayed in the form's caption bar, and if appropriate, the Windows TaskBar. The icon is also used to access the form's System Menu. {{500__window_object_image_5.png?300x181}} === Property Value === This can be one of three formats: * A path and file name of an icon (.ico) file. * A path and file name to a resource file (such as a DLL) containing the icon, along with its resource ID. The latter component is separated from the file name by a “#” character. > E.g. > > .\res\MyAppRes.Dll#192 > > .\res\MyAppRes.Dll#MYICON * The name of a Windows system Icon: * "APPLICATION" * "ERROR" * "INFORMATION" * "QUESTION" * "WARNING" * "SHIELD" === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get/Set |No |No |No | === Remarks === A form must have a System Menu if it wants to display an icon on the caption bar. Equated constants for using System Icons can be found the PS_SYSICON_EQUATES insert record. === Example === Declare Function Repository $Insert PS_SysIcon_Equates // Example 1 – setting an ICON property with a normal filename// IcoFile = ".\icons\rti_ide.res\rti_test_dummy.ico" Call Set_Property_Only( @Window, "ICON", IcoFile ) // Example 2 – setting an ICON property with a resource from a DLL.// // (the icon with an ID of "1" from Oengine.dll)// IcoFile = "oengine.dll#1" Call Set_Property_Only( @Window, "ICON", IcoFile ) // Example 3 – setting an ICON property with a System Icon// IcoFile = "WARNING" Call Set_Property_Only( @Window, "ICON", IcoFile ) // Example 4 – setting an ICON property using a repository ID// // // // IMAGE entities always return the filename in field 1// IcoFile = Repository( "ACCESS", PS_REP_SYSICON_QUESTION$ )<1> Call Set_Property_Only( @Window, "ICON", IcoFile ) === See Also === WINDOW SHOWCAPTION property, WINDOW SYSTEMMENU property, WINDOW TASKBARBUTTON property, WINDOW TASKBARID property, Appendix J – System Icons. ===== ID property ===== === Description === Returns the current row key associated with the primary table data row in a data-bound form. === Property Value === This property is string value containing the data row key if a row is loaded into the form //and// it is successfully locked by the form. If the form has not locked the row (i.e. it is in "View-Only" mode) then the ID property returns a null string instead. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get |No |No |Yes | === Remarks === This property does not return the keys associated with secondary tables in a multi-table form. === Example === // Example - assume the current form has loaded a row from the database with a key// // of "UK007" and the row has been locked successfully by the form.// RowID = Get_Property( @Window, "ID" ) // RowID contains "UK007"// // Example - assume the current form has loaded a row from the database with a key// // of "UK007" and the row has NOT been locked successfully by the form.// RowID = Get_Property( @Window, "ID" ) // RowID now contains ""// === See Also === WINDOW ATRECORD property, WINDOW ROW property, WINDOW RECORD property, WINDOW TABLE property, WINDOW READROW method, WINDOW READ event. ===== INITIALFOCUS property ===== === Description === Specifies the control that receives the input focus when a form is activated. === Property Value === This is a string value containing the fully qualified name of a control, or null if no controls on the form could accept the input focus. === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get/Set |No |No |No | === Remarks === This property is set when a control receives the input focus and is constantly updated as the user moves between controls on a form. This is to ensure that a user who switches to another form is returned to the same control when the first form is activated once more. (Contrast this with the FIRSTFOCUS property which is only set when the form is first created and remains constant.) === Example === // Example – get the "initial-focus" control for the current form.// FocusCtrl = Get_Property( @Window, "INITIALFOCUS" ) === See Also === Common GUI FOCUS property, SYSTEM FOCUS property, WINDOW GOTFOCUSCONTROL property, WINDOW FIRSTFOCUS property. ===== INITIALPOSITION property ===== === Description === Specifies the starting location of the specified form. === Property Value === This is an integer value that can be one of the following: ^//Value//^//Name// ^//Description// ^ |0 |As designed |The form is displayed using the form's Left and Top property values.| |1 |Center on desktop|The form is displayed centered on the desktop. | |2 |Center on parent |The form is displayed centered on its parent. | === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |Get/Set |Get Only |No |No |No | === Remarks === This property does not apply when used with an MDI Child form. Equated constants for the INITIALPOSITION property value can be found in the PS_WINDOW_EQUATES insert record. === Example === // Get the current form's INITIALPOSITION setting// InitPos = Get_Property( @Window, "INITIALPOSITION" ) === See Also === Common GUI SIZE property, Common GUI SYSTEMSIZE property, Common GUI RECT property, Common GUI LEFT property, Common GUI TOP property, WINDOW CENTER method. ===== IOOPTIONS property ===== === Description === Specifies the data-binding options for the form. === Property Value === This value is an @Fm-delimited array of data-binding options. See each individually named property for more information. ^//Field//^//PropertyName// ^//Description// ^ |<1> |Reserved |N/a. | |<2> |LockType |Specifies the type of row locking used by the form. | |<3> |LockCoordination |Specifies if table-lock coordination is used by the form in conjunction with record locking. | |<4> |AllowSelfLocks |Specifies if attempts to lock rows that are already locked by the current session are allowed. | |<5> |Reserved |N/a. | |<6> |NoClearOnWrite |Specifies if a form clears its contents after a successful write operation. | |<7> |Reserved |N/a. | |<8> |Reserved |N/a. | |<9> |Reserved |N/a. | |<10> |RequireOnWrite |Specifies if "data-required" checks are performed before a write operation. | |<11> |QBFReadMode |Specifies if a form's READ event is triggered when loading a data row in QBF mode. | |<12> |NumericCompare |Specifies how comparisons for column updates are performed during a write operation. | |<13> |WriteMode |Specifies how data set via the ROW property is saved during a write operation. | |<14> |LoadPrevAlways |Specifies if the "previous data row" is updated on a read operation as well as a write operation.| |<15> |SuppressSaveWarn |Specifies if a data-bound form ignores the SAVEWARN property during CLEAR and CLOSE processing. | |<16> |AllowFormStateEvents|Specifies if a form triggers the FORMSTATECHANGED and MDICHILDSTATECHANGED events. | === Property Traits === ^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^ |N/a |Get/Set |No |No |Yes | === Remarks === This property is available for backwards compatibility with earlier versions of OpenInsight and has been deprecated. From version 10 onwards each of the options above is exposed by its own individual property and these should be used in preference to the IOOPTIONS property. Equates constants for the IOOPTIONS property can be found in the OIWIN_EQUATES insert record. === Example === // Example - set the "RequireOnWrite" option for the current form// $Insert OIWin_Equates Options = Get_Property( @Window, "IOOPTIONS" ) Options<1> X (horizontal) DPI
<2> Y (vertical) DPI
\\ <0,1> Left\\ <0,2> Top\\ <0,3> Width\\ <0,4> Height\\
|
|<3> |MinPosition |Specifies the coordinates of the form's upper-left corner when minimized. This is an @Vm-delimited array:\\ \\ \\ <0,1> Left\\ <0,2> Top\\
|
|<4> |MaxPosition |Specifies the coordinates of the form's upper-left corner when maximized. This is an @Vm-delimited array:\\ \\ \\ <0,1> Left\\ <0,2> Top\\
|
=== Property Traits ===
^//Development//^//Runtime//^//Indexed//^//Scaled//^//Synthetic//^
|N/a |Get/Set |No |Yes |No |
=== Remarks ===
If the form is a top-level form that does not have a "Tool"-style FORMBORDERSTYLE property, then the coordinates in the structure above are in workspace coordinates, otherwise these are in screen coordinates. Therefore these coordinates should only be used with the PLACEMENTDATA property and not with the normal SIZE property.
(Workspace coordinates differ from screen coordinates in that they take the locations and sizes of application toolbars (including the taskbar) into account. Workspace coordinate (0,0) is the upper-left corner of the workspace area, the area of the screen not being used by application toolbars).
For more information on this property please refer to the Windows documentation regarding the GetWindowPlacement and SetWindowPlacement on the Microsoft website.
Equates constants for the PLACEMENTDATA property can be found in the PS_WINDOW_EQUATES insert record.
=== Example ===
// Example - set the "RequireOnWrite" option for the current form//
$Insert OIWin_Equates
Options = Get_Property( @Window, "IOOPTIONS" )
Options\\ <1> Left-position (if -1 then the window is \\ Centered on the X-axis) \\ \\ <2> Top-position (if -1 then the window is centered \\ On the Y-axis)\\ \\ <3> Width (-1 means do not adjust the window width)\\ \\ <4> Height (-1 means do not adjust the window \\ height)\\
\\ \\ All these values default to -1.\\ \\ //They must be in the same scale units as the form being centered.//|
|CalculateOnly|No |If TRUE$ then the form is not moved or resized, but the resulting coordinates are returned instead. Defaults to FALSE$. |
|ParentSize |No |This is an @Fm-delimited array that can be used to override the size of the parent (if CenterParent is TRUE$), or the Desktop (if CenterParent is FALSE$).\\ \\ \\ <1> Left-position \\ <2> Top-position\\ <3> Width\\ <4> Height\\
\\ \\ //They must be in the same scale units as the form being centered.// |
|Options |No |This is an @Fm-delimited array of options structured like so:\\ \\ \\ <1> Force boundary check. If this is TRUE$ then\\ the form is kept within the boundary of the\\ desktop even if the IdealSize Top and Left\\ positions have been explicitly specified.\\ \\ <2> Desktop "anchor" form. Contains the name of \\ a form to use when deciding which monitor to \\ center the form on. The form is centered \\ on the same desktop as the anchor form.\\
|
=== Returns ===
An @Fm-delimited dynamic array containing the new size of the form in the same format as the standard SIZE property.
=== Remarks ===
N/a.
=== Example ===
// Center a form on the desktop//
Call Exec_Method( @Window, "CENTER" )
// Center a form on its parent window//
Call Exec_Method( @Window, "CENTER", TRUE$ )
// Center a form on the desktop with a specific size of 800x600//
FormSize = -1 : @Fm : -1 : @Fm : 800 : @Fm : 600
Call Exec_Method( @Window, "CENTER", FALSE$, FormSize )
// Center a form on the desktop with a specific size of 800x600//
// but only return the coordinates - do not update the form.//
FormSize = -1 : @Fm : -1 : @Fm : 800 : @Fm : 600
NewSize = Exec_Method( @Window, "CENTER", FALSE$, FormSize, TRUE$ )
// Center a form on the same desktop as the RTI_IDE form and //
// ensure it stays within the desktop boundary.//
FormSize = -20 : @Fm : 10 : @Fm : 800 : @Fm : 600
Options = TRUE$
Options<2> = "RTI_IDE"
Call Exec_Method( @Window, "CENTER", FALSE$, FormSize, FALSE$, "", Options )
=== See Also ===
Common GUI MONITOR property, Common GUI SCREENSIZE property, Common GUI SIZE property, SYSTEM MONITORLIST property.
===== CLEARROW method =====
=== Description ===
Clears the data from the controls in a data-bound form by triggering the form's CLEAR event.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "CLEARROW", SaveKey, SuppressWarning, |
MaintainFocus )
=== Parameters ===
^Name ^Required^Description ^
|SaveKey |No |This is a boolean value. If TRUE$ then the controls bound to key columns will not be cleared. The default is FALSE$. |
|SuppressWarning|No |This is a boolean value. If TRUE$ then the user will not be warned if they have unsaved changes in the form before it is cleared. The default is FALSE$.|
|MaintainFocus |No |This is a boolean value. If TRUE$ then the focus is not moved. By default it is moved to the first control in the tab-order. |
=== Returns ===
The CLEAR event status. If this is not null then an error has occurred or the user stopped the clear request).
=== Remarks ===
N/a.
=== Example ===
// Example - Clear the contents of the current form without any warning//
// and change the focus back to the first in the tab-order //
Call Exec_Method( @Window, "CLEARROW", FALSE$, TRUE$, FALSE$ )
=== See also ===
WINDOW CLEAR event.
===== CLOSE method =====
=== Description ===
Closes a form by triggering its CLOSE event.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "CLOSE", CloseFlags, CloseAsync )
=== Parameters ===
^Name ^Required^Description ^
|CloseFlags|No |This is an @Fm delimited array with the following structure:\\ \\ \\ <1> If TRUE$ then suppress any warnings with \\ due to changed data if the form is data-\\ bound.\\
|
|CloseAsync|No |This is a boolean value. If TRUE$ then the form is closed in an asynchronous manner. The default is FALSE$.\\ \\ (This is analogous to using Send_Event or Post_Event to trigger a CLOSE event in previous versions of OpenInsight)|
=== Returns ===
If the form is closed asynchronously a boolean value is returned; TRUE$ if the CLOSE event request has made successfully, or FALSE$ otherwise.
If the form is //not// closed asynchronously the event status from the underlying CLOSE event is returned - if this is not null an error has occurred (or the has user stopped the close request).
=== Remarks ===
Care should be taken when closing a form from an event that is raised from one of the form's own child controls. In this case it is always better to set the CloseAsync flag to TRUE$ so that the current event has chance to finish executing before the form is destroyed.
=== Example ===
// Example – Close the current form asynchronously allowing for any data warnings//
Call Exec_Method( @Window, "CLOSE", FALSE$, TRUE$ )
=== See also ===
WINDOW CLOSE event, End_Dialog stored procedure, End_Window stored procedure.
===== CLOSEDIALOG method =====
=== Description ===
Closes a modal dialog box and returns a value back to the caller.
=== Syntax ===
ClosedFlag = Exec_Method( CtrlEntID, "CLOSEDIALOG", RetVal )
=== Parameters ===
^Name ^Required^Description ^
|RetVal|No |Value to return to the caller.|
=== Returns ===
Returns TRUE$ if the dialog box was closed, or FALSE$ otherwise.
=== Remarks ===
This method is a wrapper around the End_Dialog stored procedure. Please see the End_Dialog stored procedure description for more details.
=== Example ===
// Example – Close the current dialog box returning the contents of the EDL_NAME//
// control to the caller//
RetName = Get_Property( @ Window : ".EDL_NAME", "TEXT" )
bClosed = Exec_Method( @Window, "CLOSEDIALOG", RetName )
=== See Also ===
WINDOW SHOWDIALOG method, Dialog_Box stored procedure, End_Dialog stored procedure.
===== DETACHCOMMON method =====
=== Description ===
“Detaches” a labelled common area from the form and optionally frees it.
=== Syntax ===
SucessFlag = Exec_Method( CtrlEntID, "DETACHCOMMON", CommonName, bFree )
=== Parameters ===
^Name ^Required^Description ^
|CommonName|Yes |Name of the common area to attach. |
|bFree |No |If TRUE$ then the common area will be freed after it has been detached.|
=== Returns ===
Returns TRUE$ if the common areas was detached successfully, or FALSE$ otherwise.
=== Remarks ===
N/a.
=== Example ===
// Example – Detach a common area from the current form and free it.//
CommName = "%%MYDATA_" : @window
bOK = Exec_Method( CtrlEntID, "DETACHCOMMON", CommName, TRUE$ )
=== See Also ===
WINDOW COMMONLIST property, WINDOW ATTACHCOMMON method, End_Window stored procedure, FreeCommon Basic+ statement.
===== DELETEROW method =====
=== Description ===
Deletes the currently loaded data row in a data-bound form by triggering the form's DELETE event.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "DELETEROW", SuppressWarning )
=== Parameters ===
^Name ^Required^Description ^
|SuppressWarning|No |This is a boolean value. If TRUE$ then the user will not be asked to confirm if they wish to delete the row. The default is FALSE$.|
=== Returns ===
The DELETE event status. If this is not null an error has occurred (or the user has stopped the delete request).
=== Remarks ===
N/a.
=== Example ===
// Example - Delete the contents of the current form unconditionally. //
Call Exec_Method( @Window, "DELETEROW", TRUE$ )
=== See also ===
WINDOW DELETE event.
===== FLASH method =====
=== Description ===
"Flashes" a form's caption and/or taskbar button the specified number of times to draw the user's attention to it. The active state of the window is not changed.
=== Syntax ===
ActiveFlag = Exec_Method( CtrlEntID, "FLASH", FlashCount, FlashCaption, |
FlashTaskBar , FlashRate )
=== Parameters ===
^Name ^Required^Description ^
|FlashCount |No |An integer value specifying the number of times to flash the form, or flash it continuously (defaults to 1)\\ \\ * A value greater than 0 flashes it that many times.\\ * A value of -1 flashes the form until it is stopped.\\ * A value of -2 flashes the form until it is brought to the foreground.\\ * A value of 0 stops the form flashing.|
|FlashCaption|No |A boolean value – if TRUE$ (the default) the form's caption bar is flashed. |
|FlashTaskBar|No |A boolean value – if TRUE$ (the default) the form's taskbar button is flashed (if it has one). |
|FlahsRate |No |A integer value specifying the flash rate in milliseconds. This defaults to the system cursor blink rate. |
=== Returns ===
Returns FALSE$ if the form was inactive before the flash or TRUE$ if it was active.
=== Remarks ===
The FLASH method is implemented internally using the FlashWindowEx Windows API function, so please refer to the documentation on the Microsoft website for further information.
=== Example ===
// Example – flash the current form continuously until it is activated. //
Call Exec_Method( @Window, "FLASH", -2 )
=== See also ===
WINDOW ACTIVE property.
===== GETFOCUSEDCONTROL method =====
=== Description ===
Returns the name of the control that has the focus if the form is active, or, if the form is not active, the name of the control that will receive the focus when it is.
=== Syntax ===
FocusCtrlName = Exec_Method( CtrlEntID, "GETFOCUSEDCONTROL", NoInternal )
=== Parameters ===
^Name ^Required^Description ^
|NoInternal|No |If TRUE$ then only controls //not// marked as "Internal" will be returned. Defaults to FALSE$.|
=== Returns ===
The name of the control that is currently focused or will receive the focus when the form is activated.
=== Remarks ===
Executing this method is essentially the same as using the "get" operation in the WINDOW FOCUS property to return the current focus control for the form. However, some objects, like the cell editor an in EDITTTABLE control, are marked as "internal" and it may not be appropriate to use them when returned via the FOCUS property. In this case it is better to use the GETFOCUSEDCONTROL method and the NoInternal parameter to return the parent "non-internal" control instead.
=== Example ===
$Insert Logical
// Return the focused control for the current form, resolving it to a non-internal ID.//
FocusCtrlID = Exec_Method( @Window, "GETFOCUSEDCONTROL", TRUE$ )
=== See Also ===
Common GUI object FOCUS property, SYSTEM FOCUS property, WINDOW FIRSTFOCUS property, WINDOW FOCUS property, WINDOW ACTIVATED event, WINDOW INACTIVATED event.
===== HIDE method =====
=== Description ===
Hides a form using the specified effect.
=== Syntax ===
Call Exec_Method( CtrlEntID, "HIDE", HideEffect )
=== Parameters ===
^Name ^Required^Description ^
|HideEffect|No |If specified this should be a numeric value corresponding to a hide effect as defined in the HIDEEFFECT property.\\ \\ If null or "-1" then the effect specified in the HIDEEFFECT property is used.|
=== Returns ===
N/a.
=== Remarks ===
This method does not apply when used with an MDI Child form.
Equated constants for the HIDEEFFECT property value can be found in the PS_WINDOW_EQUATES insert record.
=== Example ===
// Example – hide the current form using a "Slide Up" effect//
$Insert PS_Window_Equates
Call Exec_Method( @Window, "HIDE", PS_SHE_SLIDE_UP$ )
=== See Also ===
WINDOW HIDEEFFECT property, WINDOW SHOWEFFECT property, WINDOW TRANSLUCENCY property, WINDOW VISIBLE property, WINDOW SHOW method.
===== HIDEMENUBAR method =====
=== Description ===
Hides the menubar for the specified form.
{{500__window_object_image_22.png?253x108}}{{500__window_object_image_23.png?251x123}}
=== Syntax ===
Call Exec_Method( CtrlEntID, "HIDEMENUBAR" )
=== Parameters ===
N/a.
=== Returns ===
N/a.
=== Remarks ===
N/a.
=== Example ===
// Example – hide the menubar for the current form//
Call Exec_Method( @Window, "HIDEMENUBAR" )
=== See Also ===
MENUBAR object, WINDOW SHOWMENUBAR method
===== MDICASCADE method =====
=== Description ===
Arranges MDI child forms in a stacked cascading formation, ensuring the title bar of each is visible.
=== Syntax ===
SuccessFlag = Exec_Method( CtrlEntID, "MDICASCADE", SkipDisabled, UseZOrder )
=== Parameters ===
^Name ^Required^Description ^
|SkipDisabled|No |This is a boolean value - if TRUE$ then any disabled MDI child forms are excluded from the cascade operation.|
|UseZOrder |No |This is a boolean value - if TRUE$ then the MDI Child forms are arranged in z-order. |
=== Returns ===
TRUE$ if the cascade operation was successful, FALSE$ otherwise.
=== Remarks ===
This method only applies to MDI frame forms.
=== Example ===
// Cascade the MDI child forms for the current MDI frame form, ignoring disabled forms.//
Call Exec_Method( @Window, "MDICASCADE", TRUE$ )
=== See Also ===
WINDOW MDIFRAME property, WINDOW MDIICONARRANGE method, WINDOW MDITILE method.
===== MDIICONARRANGE method =====
=== Description ===
Arranges all minimized MDI child forms for the specified MDI frame form. Non-minimized MDI child forms are not affected.
=== Syntax ===
SuccessFlag = Exec_Method( CtrlEntID, "MDIICONARRANGE" )
=== Parameters ===
N/a.
=== Returns ===
TRUE$ if the operation was successful, FALSE$ otherwise.
=== Remarks ===
This method only applies to MDI frame forms.
This method is called by the system-level ARRANGEICONS event handler.
For more details on this method please see the documentation for the WM_MDIICONARRANGE message on the Microsoft website.
=== Example ===
// Arrange the minimized MDI child icons for the current MDI frame form//
Call Exec_Method( @Window, "MDIICONARRANGE", TRUE$ )
=== See Also ===
WINDOW MDIFRAME property, WINDOW MDICASCADE method , WINDOW MDITILE method, WINDOW ARRANGEICONS event.
===== MDITILE method =====
=== Description ===
Arranges MDI child forms in a tiled format. Each child is displayed in its entirety, overlapping none of the other child forms. All of the child forms are sized, as necessary, to fit within the MDI client area.
=== Syntax ===
SuccessFlag = Exec_Method( CtrlEntID, "MDITILE", TileHorizontal, SkipDisabled )
=== Parameters ===
^Name ^Required^Description ^
|TileHorizontal|No |This is a boolean value - if TRUE$ then the MDI Child forms are tiled horizontally, otherwise they are tiled vertically.|
|SkipDisabled |No |This is a boolean value - if TRUE$ then any disabled MDI child forms are excluded from the tiling operation. |
=== Returns ===
TRUE$ if the tiling operation was successful, FALSE$ otherwise.
=== Remarks ===
This method only applies to MDI frame forms.
The arguments passed to this method have been changed from previous versions of OpenInsight to support horizontal tiling and the "SkipDisabled" option simultaneously.
=== Example ===
// Tile the MDI child forms vertically for the current MDI frame form, //
// ignoring disabled child forms.//
Call Exec_Method( @Window, "MDITILE", FALSE$, TRUE$ )
=== See Also ===
WINDOW MDIFRAME property, WINDOW MDICASCADE method, WINDOW MDIICONARRAGE method.
===== QBFASKQUERY method =====
=== Description ===
Asks the user for an RLIST query statement and loads the results into the specified form's QBF result list (QBFLIST property).
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFASKQUERY" )
=== Parameters ===
N/a.
=== Returns ===
The QBFQUERY event status. If this is not null then an error has occurred or the user has cancelled the operation.
=== Remarks ===
This method triggers the form's QBFQUERY event.
The query statement entered must be a valid RLIST SELECT statement.
=== Example ===
// Example – ask the user for an RLIST query//
Status = Exec_Method( @Window, "QBFASKQUERY" )
If BLen( Status ) Then
// Error or cancelled ....//
End
=== See also ===
WINDOW QBFLIST property, WINDOW QBFQUERY event, RLIST stored procedure.
===== QBFCLOSESESSION method =====
=== Description ===
Closes the QBF session for the specified form, returning it to normal operation.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFCLOSESESSION" )
=== Parameters ===
N/a.
=== Returns ===
The QBFCLOSE event status. If this is not null then an error has occurred.
=== Remarks ===
This method triggers the form's QBFCLOSE event. If successful, the form's QBFSTATUS property is set to "QBFInactive".
=== Example ===
// Example – end the current form's QBF session.//
Status = Exec_Method( @Window, "QBFCLOSESESSION" )
=== See also ===
WINDOW QBFSTATUS property, WINDOW QBFINITSESSION method, WINDOW QBFCLOSE event.
===== QBFGOTO method =====
=== Description ===
Loads a specified row from the form's QBF result list (QBFLIST property) using an index position.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFGOTO", Position )
=== Parameters ===
^Name ^Required^Description ^
|Position|No |This is a numeric value which should be between 1 and the number of rows in the QBF result list.\\ \\ If not specified, the user is asked to enter the position via a message box.|
=== Returns ===
The QBFABS event status. If this is not null then an error has occurred, or the user has cancelled the process.
=== Remarks ===
This method triggers the form's QBFABS event.
The form must have a valid QBF result list active, i.e. the QBFSTATUS property must have a value of " QBFActive".
=== Example ===
// Example – display the 10th row in the QBF result list//
Status = Exec_Method( @Window, "QBFGOTO", 10 )
If BLen( Status ) Then
// Error ...//
End
=== See also ===
WINDOW QBFLIST property, WINDOW QBFPOS property, WINDOW QBFSTATUS property, WINDOW QBFABS event.
===== QBFGOTOID method =====
=== Description ===
Loads a specified row from the form's QBF result list (QBFLIST property) using a row ID.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFGOTOID", RowID )
=== Parameters ===
^Name ^Required^Description ^
|RowID|No |This is key value that should be in the QBF result list.\\ \\ If not specified, the user is asked to enter it directly via a message box.|
=== Returns ===
The QBFLOADID event status. If this is not null then an error has occurred, or the user has cancelled the process.
=== Remarks ===
This method triggers the form's QBFLOADID event.
The form must have a valid QBF result list active, i.e. the QBFSTATUS property must have a value of " QBFActive".
=== Example ===
// Example – display the row with the key of “A123” in the QBF result list//
Status = Exec_Method( @Window, "QBFGOTOID", “A123” )
If BLen( Status ) Then
// Error ...//
End
=== See also ===
WINDOW QBFLIST property, WINDOW QBFSTATUS property, WINDOW QBFLOADID event.
===== QBFINITSESSION method =====
=== Description ===
Initializes and begins a QBF session for the specified form. Any existing data is cleared, and normal data validation processing is temporarily removed from controls to allow easy data entry for the query.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFINITSESSION" )
=== Parameters ===
N/a.
=== Returns ===
The QBFINIT event status. If this is not null then an error has occurred.
=== Remarks ===
This method triggers the form's QBFINIT event. If successful, the form's QBFSTATUS property is set to "QBFInitialize " to signify that the form is in "query entry" mode.
=== Example ===
// Example – begin a QBF session for the current form.//
Status = Exec_Method( @Window, "QBFINITSESSION" )
=== See also ===
WINDOW QBFSTATUS property, WINDOW QBFCLOSESESSION method, WINDOW QBFINIT event.
===== QBFLOADSAVEDLIST method =====
=== Description ===
Asks the user for the name of a saved list and loads the keys into the specified form's QBF result list (QBFLIST property).
The source of the list may be chosen from the TCL Query Table or from the SYSLISTS table.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFLOADSAVEDLIST" )
=== Parameters ===
N/a.
=== Returns ===
The QBFLOADLIST event status. If this is not null then an error has occurred or the user has cancelled the operation.
=== Remarks ===
This method triggers the form's QBFLOADLIST event.
=== Example ===
// Example – ask the user for the list of keys to load.//
Status = Exec_Method( @Window, "QBFLOADSAVEDLIST" )
=== See also ===
WINDOW QBFLIST property, WINDOW QBFLOADLIST event.
===== QBFRUNQUERY method =====
=== Description ===
Builds and executes an RLIST query from the data in the controls and populates the specified form's QBF result list (QBFLIST property).
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFRUNQUERY" )
=== Parameters ===
N/a.
=== Returns ===
The QBFRUN event status. If this is not null then an error has occurred.
=== Remarks ===
This method triggers the form's QBFRUN event.
The form's QBFSTATUS property must have been set to "QBFInitialize" by executing the QBFINITSESSION method first.
=== Example ===
// Example – execute the QBF query process to find and load the results into the//
// current form://
Status = Exec_Method( @Window, "QBFRUNQUERY" )
=== See also ===
WINDOW QBFLIST property, WINDOW QBFSTATUS property, WINDOW QBFINITSESSION method, WINDOW QBFRUN event.
===== QBFSHOWFIRST method =====
=== Description ===
Loads the first row from the specified form's QBF result list (QBFLIST property).
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFSHOWFIRST" )
=== Parameters ===
N/a.
=== Returns ===
The QBFFIRST event status. If this is not null then an error has occurred.
=== Remarks ===
This method triggers the form's QBFFIRST event.
The form must have a valid QBF result list active, i.e. the QBFSTATUS property must have a value of " QBFActive".
=== Example ===
// Example – display the first row in the QBF result list//
Status = Exec_Method( @Window, "QBFSHOWFIRST" )
If BLen( Status ) Then
// Error ...//
End
=== See also ===
WINDOW QBFLIST property, WINDOW QBFPOS property, WINDOW QBFSTATUS property, WINDOW QBFSHOWLAST method, WINDOW QBFSHOWNEXT method, WINDOW QBFSHOWPREV method, WINDOW QBFSHOWTABLE method, WINDOW QBFFIRST event.
===== QBFSHOWLAST method =====
=== Description ===
Loads the last row from the specified form's QBF result list (QBFLIST property).
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFSHOWLAST" )
=== Parameters ===
N/a.
=== Returns ===
The QBFLAST event status. If this is not null then an error has occurred.
=== Remarks ===
This method triggers the form's QBFLAST event.
The form must have a valid QBF result list active, i.e. the QBFSTATUS property must have a value of " QBFActive".
=== Example ===
// Example – display the last row in the QBF result list//
Status = Exec_Method( @Window, "QBFSHOWLAST" )
If BLen( Status ) Then
// Error ...//
End
=== See also ===
WINDOW QBFLIST property, WINDOW QBFPOS property, WINDOW QBFSTATUS property, WINDOW QBFSHOWFIRST method, WINDOW QBFSHOWNEXT method, WINDOW QBFSHOWPREV method, WINDOW QBFSHOWTABLE method, WINDOW QBFLAST event.
===== QBFSHOWNEXT method =====
=== Description ===
Loads the next row from the specified form's QBF result list (QBFLIST property).
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFSHOWNEXT" )
=== Parameters ===
N/a.
=== Returns ===
The QBFNEXT event status. If this is not null then an error has occurred.
=== Remarks ===
If the current position is at the end of the QBF result list then it is reset to point at the first row instead.
This method triggers the form's QBFNEXT event.
The form must have a valid QBF result list active, i.e. the QBFSTATUS property must have a value of " QBFActive".
=== Example ===
// Example – display the next row in the QBF result list//
Status = Exec_Method( @Window, "QBFSHOWNEXT" )
If BLen( Status ) Then
// Error ...//
End
=== See also ===
WINDOW QBFLIST property, WINDOW QBFPOS property, WINDOW QBFSTATUS property, WINDOW QBFSHOWFIRST method, WINDOW QBFSHOWLAST method, WINDOW QBFSHOWPREV method, WINDOW QBFSHOWTABLE method, WINDOW QBFNEXT event.
===== QBFSHOWPREV method =====
=== Description ===
Loads the previous row from the specified form's QBF result list (QBFLIST property).
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFSHOWPREV" )
=== Parameters ===
N/a.
=== Returns ===
The QBFPREV event status. If this is not null then an error has occurred.
=== Remarks ===
If the current position is at the start of the QBF result list then it is reset to point at the last row instead.
This method triggers the form's QBFPREV event.
The form must have a valid QBF result list active, i.e. the QBFSTATUS property must have a value of " QBFActive".
=== Example ===
// Example – display the previous row in the QBF result list//
Status = Exec_Method( @Window, "QBFSHOWPREV" )
If BLen( Status ) Then
// Error ...//
End
=== See also ===
WINDOW QBFLIST property, WINDOW QBFPOS property, WINDOW QBFSTATUS property, WINDOW QBFSHOWFIRST method, WINDOW QBFSHOWLAST method, WINDOW QBFSHOWNEXT method, WINDOW QBFSHOWTABLE method, WINDOW QBFPREV event.
===== QBFSHOWTABLE method =====
=== Description ===
Displays the QBF result list in a non-modal dialog box. As the user selects a value in the dialog the corresponding row is loaded in the owning form.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "QBFSHOWTABLE" )
=== Parameters ===
N/a.
=== Returns ===
The QBFTABLE event status. If this is not null then an error has occurred.
=== Remarks ===
This method triggers the form's QBFTABLE event.
The form must have a valid QBF result list active, i.e. the QBFSTATUS property must have a value of " QBFActive".
=== Example ===
// Example – display the QBF result list//
Status = Exec_Method( @Window, "QBFSHOWTABLE" )
If BLen( Status ) Then
// Error ...//
End
=== See also ===
WINDOW QBFLIST property, WINDOW QBFPOS property, WINDOW QBFSTATUS property, WINDOW QBFSHOWFIRST method, WINDOW QBFSHOWLAST method, WINDOW QBFSHOWNEXT method, WINDOW QBFPREV event.
===== READPREVROW method =====
=== Description ===
Populates controls in the specified form with data from the previously loaded row.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "READPREVROW", ControlList )
=== Parameters ===
^Name ^Required^Description ^
|ControlList|No |If specified this an @Fm-delimited array of data-bound control names that should be loaded from the cached data.\\ \\ If this parameter is null then all data-bound controls will be loaded from the cached data.|
=== Returns ===
Error status results. If this is not null then an error has occurred.
=== Remarks ===
A data-bound form caches row data at the following points:
* When data is written to the database – a copy of the data in the controls is saved.
* When data is loaded into the controls during a read operation. This is optional and only happens If the LOADPREVALWAYS property is TRUE$ : if so a copy of the data loaded into the controls during a READ event is cached (this is always overwritten by data from a write operation of course).
The READPREVROW method uses this cached data to load controls when requested.
Controls bound to key columns are ignored.
This method is intended to mimic the "Alt-C" functionality of found in Advanced Revelation applications.
=== Example ===
// Example - Load data from a previous row into the control that currently//
// has the focus. This sort of functionality would typically be found on a //
// form's Edit menu.//
CtrlID = Get_Property( @Window, "FOCUS" )
If BLen( CtrlID ) Then
ColPos = Get_Property( CtrlID, "POS" )
If ColPos Then
// CtrlID is a non-key databound control//
Status = Exec_Method( @Window, "READPREVROW", CtrlID )
End
End
=== See Also ===
WINDOW LOADPREVALWAYS property, WINDOW ROW property, WINDOW READ event, WINDOW WRITE event.
===== READROW method =====
=== Description ===
Reads the data into the specified data-bound form and populates the controls.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "READROW", RowID, SuppressWarning )
=== Parameters ===
^Name ^Required^Description ^
|RowID |No |If specified this is the ID of the row to be loaded into the form.\\ \\ For a multi-table form RowID should be an @fm-delimited array of keys that matches the order of the tables in the form's join specification:\\ \\ i.e.\\ \\ \\ rowID<1> = Key for primary table\\ rowID<2> = Key for first subsidiary table\\ rowID<3> = Key for second subsidiary table\\ rowID = Key for nth subsidiary table \\
\\ \\ etc.\\ \\ If null (the default) then the data entered in the key-controls is extracted to build the RowID used to load the row.|
|SuppressWarning|No |If TRUE$ then the SAVEWARN property is not checked before a new row is loaded when rowID is specified.\\ \\ The default is FALSE$, which means the SAVEWARN property will be processed as normal.\\ \\ This parameter is ignored is RowID is null. |
=== Returns ===
The READ event status. If this is not null then an error has occurred or the user has cancelled the process.
=== Remarks ===
This method triggers the form's READ event.
=== Example ===
// Example - Read a row into the current form unconditionally//
RowID = "AS123*EF"
ReadStatus = Exec_Method( @Window, "READROW", RowID, TRUE$ )
If BLen( ReadStatus ) Then
// Error or cancelled... //
End
=== See Also ===
WINDOW ID property, WINDOW ROW property, WINDOW SAVEWARN property, WINDOW WRITEROW method, WINDOW READ event.
===== SCROLL method =====
=== Description ===
Scrolls the contents of the specified form’s client area.
=== Syntax ===
SuccessFlag = Exec_Method( CtrlEntID, "SCROLL", XShift, YShift )
=== Parameters ===
^Name ^Required^Description ^
|XShift|Yes |Integer value specifying the amount of horizontal scrolling.|
|YShift|Yes |Integer value specifying the amount of vertical scrolling. |
=== Returns ===
TRUE$ if the client area was scrolled successfully, or FALSE$ otherwise.
=== Remarks ===
The XShift and YShift values are interpreted as DIPs or PX based on the form's SCALEUNITS property.
The SCROLL method is implemented internally using the ScrollWindow Windows API function. More information on this function can be found on the Microsoft website.
=== Example ===
// Example – scroll the form’s contents by 100 DIPs vertically//
Call Exec_Method( @Window, "SCROLL", 0, 100 )
=== See Also ===
N/a.
===== SHOW method =====
=== Description ===
Displays a form using the specified effect.
=== Syntax ===
Call Exec_Method( CtrlEntID, "SHOW", ShowEffect )
=== Parameters ===
^Name ^Required^Description ^
|ShowEffect|No |If specified this should be a numeric value corresponding to a show effect as described in the SHOWEFFECT property.\\ \\ If null or "-1" then the effect specified in the SHOWEFFECT property is used.|
=== Returns ===
N/a.
=== Remarks ===
This method does not apply when used with an MDI Child form.
Equated constants for the SHOWEFFECT property value can be found in the PS_WINDOW_EQUATES insert record.
=== Example ===
// Example – shown the current form using a "Slide Down" effect//
$Insert PS_Window_Equates
Call Exec_Method( @Window, "SHOW", PS_SHE_SLIDE_DOWN$ )
=== See Also ===
WINDOW HIDEEFFECT property, WINDOW SHOWEFFECT property, WINDOW TRANSLUCENCY property, WINDOW VISIBLE property, WINDOW HIDE method.
===== SHOWDIALOG method =====
=== Description ===
Displays a dialog box using the specified form as the owner.
=== Syntax ===
RetVal = Exec_Method( CtrlEntID, "SHOWDIALOG", DialogName, CreateParam, |
Options, AsyncParams )
=== Parameters ===
^Name ^Required^Description ^
|DialogName |Yes |Name of the form to execute as a dialog box. Must be in upper-case. |
|CreateParam|No |Data to pass to the form's CREATE event. This data is passed as the "CreateParam" argument when the CREATE event is triggered. It must //not// contain any @Rm system delimiter characters. |
|Options |No |A dynamic array of extra options for launching the form:\\ \\ <1> If TRUE$ then disable ALL other forms owned by\\ \\ the owner form, not just the owner form itself.\\ \\ <2> GETPARENTFORM override. The Dialog_Box stored\\ \\ procedure uses the WINDOW object GETPARENTFORM\\ \\ method internally. This option allows it to be\\ \\ tweaked as desired. |
|AsyncParams|No |A dynamic array of options that control Asynchronous mode. When executed in this mode the returned data is not passed directly back to the calling stored procedure – rather it is passed back via the owner's ENDDIALOG event.\\ \\ <1> If TRUE$ then the dialog will be executed in\\ \\ Asynchronous mode.\\ \\ <2> Contains a string argument passed back to the\\ \\ owner's ENDDIALOG event. Useful for identifying\\ \\ the returned data.|
=== Returns ===
If the dialog box is executed in synchronous mode the return value is the data passed back from the CLOSEDIALOG method (or an End_Dialog function call).
If the dialog is executed in asynchronous mode the return value will be the instance ID of the created dialog box. In this case the data passed back from an End_Dialog call will passed as an argument to the owner form's ENDDIALOG event.
If an error occurs the return value will be null.
=== Remarks ===
This method is a wrapper around the Dialog_Box stored procedure. Please see the Dialog_Box stored procedure description for more details.
=== Example ===
// Example - Display a dialog box in synchronous mode using the //
// current form as the owner and passing it the contents of a //
// variable called CurrName as the CreateParam.//
NewName = Exec_Method( @Window, "SHOWDIALOG", "MY_DIALOG_BOX", CurrName )
If BLen( NewName ) Then
// The user entered a new name so process it//
Call Do_Something_With_This_Name( NewName )
End
=== See Also ===
WINDOW CLOSEDIALOG method, WINDOW STARTFORM method, Dialog_Box stored procedure.
===== SHOWINDEXLOOKUP method =====
=== Description ===
Displays an Index Lookup dialog box using the specified form as the owner.
=== Syntax ===
RetVal = Exec_Method( CtrlEntID, "SHOWINDEXLOOKUP", IndexedTable, |
SearchColumns, DisplayColumns, SelMode )
=== Parameters ===
^Name ^Required^Description ^
|IndexedTable |Yes |The indexed table to search. This table must have at least one Btree Index on it. |
|SearchColumns |Yes |Contains an @Fm-delimited list of column names to display in the dialog that the user may search. |
|DisplayColumns|Yes |Contains an @Fm-delimited list of columns names to show in the results popup when a user chooses the row(s) to load into the form. |
|SelMode |No |Contains an @fm delimited list of selection options:\\ \\ \\ <1> Mode – this can be either "MULTI" or\\ "SINGLE" (the default). If "MULTI"\\ then the user may select more than\\ one row to return.\\ \\ <2> Contains the name of the control to \\ return the selected row IDs to. If \\ null then the row IDs are loaded into\\ the form as a QBF result list.\\ \\ This can be a virtual name like "@WINDOW"\\ or "@SELF" that are used in normal quick\\ event programming.\\ \\ <3> If a control name is specified in\\ field <2> this field contains the name \\ of the property to set such as "TEXT"\\ \\
|
=== Returns ===
The IXLOOKUP event status. If this is not null then an error has occurred or the user has cancelled the process.
=== Remarks ===
This method triggers the form's IXLOOKUP event.
=== Example ===
// Example - launch the index lookup dialog using the current window as the owner,//
// and put the returned key into the EDL_CUST_ID control//
TableName = "CUSTOMERS"
SearchCols = "SURNAME" : @Fm : "STREET" : @Fm : "CITY"
DisplayCols = "FULL_NAME" : @Fm : "FULL_ADDRESS"
SelMode = "SINGLE"
SelMode<2> = @Window : ".EDL_CUST_ID"
SelMode<3> = "TEXT"
Status = Exec_Method( @Window, "SHOWINDEXLOOKUP", |
TableName, |
SearchCols, |
DisplayCols, |
SelMode )
=== See Also ===
WINDOW STARTDIALOG method, WINDOW SHOWMESSAGE method, WINDOW SHOWPOPUP method, WINDOW IXLOOKUP event.
===== SHOWMENUBAR method =====
=== Description ===
Shows the menubar for the specified form.
{{500__window_object_image_24.png?252x107}}{{500__window_object_image_25.png?253x122}}
=== Syntax ===
Call Exec_Method( CtrlEntID, "SHOWMENUBAR" )
=== Parameters ===
N/a.
=== Returns ===
N/a.
=== Remarks ===
N/a.
=== Example ===
// Example – show the menubar for the current form//
Call Exec_Method( @Window, "SHOWMENUBAR" )
=== See Also ===
MENUBAR object, WINDOW HIDEMENUBAR method
===== SHOWMESSAGE method =====
=== Description ===
Displays a message box, using the specified form as the parent.
=== Syntax ===
MessageValue = Exec_Method( CtrlEntID, "SHOWMESSAGE", MessageStruct, |
MessageName )
=== Parameters ===
^Name ^Required^Description ^
|MessageStruct|Maybe |This is an @Fm-delimited array that contains a message structure as per the Msg() stored procedure.\\ \\ Required if MessageName is null. |
|MessageName |Maybe |Contains the name of an OpenInsight repository MSG entity to display. The fields in the MessageStruct parameter override the fields from the stored entity.\\ \\ Required if MessageStruct is null.|
=== Returns ===
The value as specified by the message definition.
=== Remarks ===
This method is basically a wrapper around the Msg stored procedure. Please see the documentation on Msg for more information.
=== See also ===
SYSTEM SHOWMESSAGE method, Msg stored procedure.
=== Example ===
// Example - display a simple message//
$Insert Msg_Equates
MsgStruct = ""
MsgStruct\\ MYAPP*POPUP**MYPOPUP\\
\\ \\ or\\ \\ \\ MYPOPUP\\
\\ \\ This parameter is required if PopupStruct is null.|
=== Returns ===
The value as defined by the popup structure. See the Popup stored procedure for more details.
=== Remarks ===
This method is a wrapper around the Popup stored procedure. Please see the Popup stored procedure description and the POPUP_EQUATES insert record for more details.
=== Example ===
// Example - Display the ASCII_CHART popup box.//
PopupVal = Exec_Method( @Window, "SHOWPOPUP", "", "ASCII_CHART" )
=== See Also ===
SYSTEM SHOWPOPUP method, WINDOW STARTDIALOG method, WINDOW SHOWINDEXLOOKUP method, WINDOW SHOWMESSAGE method, Popup stored procedure.
===== STARTFORM method =====
=== Description ===
Executes a new form, using the specified form as the owner.
=== Syntax ===
RetVal = Exec_Method( CtrlEntID, "STARTFORM", FormName, CreateParam )
=== Parameters ===
^Name ^Required^Description ^
|FormName |Yes |Name of the form to execute. Must be in upper-case. |
|CreateParam|No |Data to pass to the form's CREATE event. This data is passed as the "CreateParam" argument when the CREATE event is triggered.|
=== Returns ===
The instance name of the newly created form, or null if the form cannot be started. The instance ID is usually the same as the passed FormName, but if the form is flagged as multi-instance then the PS can append a unique number (delimited with an "*" character) to the returned ID to ensure that there are no conflicts with existing forms.
=== Remarks ===
This method is a wrapper around the Start_Window stored procedure. Please see the Start_Window stored procedure description for more details.
=== Example ===
// Example - Display a form using the current form as the owner and passing//
// it the contents of a variable called SearchVar as the CreateParam.//
FormID = Exec_Method( @Window, "STARTFORM", "QUICK_SEARCH", SearchVar )
If BLen( FormID ) Else
// Error!....//
End
=== See Also ===
SYSTEM STARTFORM method, WINDOW SHOWDIALOG method, WINDOW STARTMDICHILDFORM method, Start_Window stored procedure.
===== STARTMDICHILDFORM method =====
=== Description ===
Executes a new MDI child form for the specified MDI Frame form.
=== Syntax ===
RetVal = Exec_Method( CtrlEntID, "STARTMDICHILDFORM", FormName, CreateParam |
AppearanceMode, InitX, InitY )
=== Parameters ===
^Name ^Required^Description ^
|FormName |Yes |Name of the child form to execute. Must be in upper-case. |
|CreateParam |No |Data to pass to the child form's CREATE event. This data is passed as the "CreateParam" argument when the CREATE event is triggered. |
|AppearanceMode|No |Specifies how the child form should be displayed. Can be one of the following values:\\ \\ \\ 0 : Displays in the same way as the currently\\ : active child (this is the default)\\ 1 : Normal\\ 2 : Minimized\\ 3 : Maximized\\
|
|InitX |No |The initial X position of the child in the parent form's MDI Client area. |
|InitY |No |The initial Y position of the child in the parent form's MDI Client area. |
=== Returns ===
The Instance ID of the newly created form is returned if successful. Null is returned if the form fails to start. The instance ID is usually the same as the passed FormName, but if the form is flagged as multi-instance then the PS can append a unique number (delimited with an "*" character) to the returned ID to ensure that there are no conflicts with existing forms.
=== Remarks ===
This method is only supported for MDI Frame forms.
This method is a wrapper around the Start_MDIChild stored procedure. Please see the Start_ MDIChild stored procedure description for more details.
=== Example ===
// Example - Start a maximized MDI Child form in an MDI Frame form, passing //
// an ID to load in the child's CREATE event.//
$Insert MSWin_ShowWindow_Equates
CustID = "A12345"
ChildID = Exec_Method( @Window, "STARTMDICHILDFORM",
"CUSTOMER_ENTRY", |
CustID, |
SW_SHOWMAXIMIZED$, "", "" )
=== See Also ===
WINDOW MDIFRAME property, SYSTEM STARTFORM method, WINDOW SHOWDIALOG method, WINDOW STARTMDICHILDFORM method, Start_MDIChild stored procedure.
===== TRACKDROPDOWNMENU method =====
=== Description ===
Displays a dropdown menu for a top-level menu bar item on the specified form. The menu is created and displayed from the passed menu item structure.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "TRACKDROPDOWNMENU", MenuItemID, |
MenuStruct )
=== Parameters ===
^Name ^Required^Description ^
|MenuItemID|Yes |Contains the fully qualified name of the top-level menu item to "drop-down". |
|MenuStruct|Yes |A dynamic array containing the executable structure of the menu.\\ \\ Note that this structure does //not// include the usual menu header fields.|
=== Returns ===
TRUE$ if the menu is created and displayed successfully, or FALSE$ otherwise.
=== Remarks ===
This method is called by the DROPDOWNMENU event to display the dropdown menu associated with a top-level menu item.
This is considered a low-level method. It is better to make any adjustments to the menu structure in the DROPDOWN menu event handler instead.
Equates constants for working with menu structures can be found in the PS_MENU_EQUATES insert record. Equated constants for the "TPM_" values can be found in the MSWIN_MENU_EQUATES insert record.
=== Example ===
// Display a droopdown menu for the current form's "EXAMPLE" top-level menu item //
// with two items and a separator//
$Insert PS_Menu_Equates
$insert MSWin_Menu_Equates
MenuStruct = ""
MenuID = @Window : ".MENU.EXAMPLE"
ItemStruct = ""
ItemStruct<0,0,MENUPOS_TYPE$> = MENUTYPE_ITEM$
ItemStruct<0,0,MENUPOS_END$> = FALSE$
ItemStruct<0,0,MENUPOS_NAME$> = MenuID : ".OPEN_SESAME"
ItemStruct<0.0,MENUPOS_TEXT$> = "Open Sesame"
MenuStruct<0,-1> = ItemStruct
ItemStruct = ""
ItemStruct<0,0,MENUPOS_TYPE$> = MENUTYPE_SEPARATOR$$
ItemStruct<0,0,MENUPOS_END$ = FALSE$
ItemStruct<0.0,MENUPOS_NAME$ = MenuID : ".SEP101"
ItemStruct<0.0,MENUPOS_TEXT$> = "SEP101"
MenuStruct<0,-1> = ItemStruct
ItemStruct = ""
ItemStruct<0,0,MENUPOS_TYPE$> = MENUTYPE_ITEM$
ItemStruct<0,0,MENUPOS_END$> = TRUE$
ItemStruct<0,0,MENUPOS_NAME$> = MenuID : ".CLOSE_SESAME"
ItemStruct<0.0,MENUPOS_TEXT$> = "Close Sesame"
MenuStruct<0,-1> = ItemStruct
IsOK = Exec_Method( @Window, "TRACKDROPDOWNMENU", MenuID, MenuStruct )
=== See also ===
Common GUI MENU event, WINDOW DROPDOWNMENU event.
===== UPDATEROW method =====
=== Description ===
Updates the data associated with the primary table of a data-bound form //without// updating data-bound controls.
=== Syntax ===
SuccessFlag = Exec_Method( CtrlEntID, "UPDATEROW", NewRow )
=== Parameters ===
^Name ^Required^Description ^
|NewRow|Yes |New data for the row.|
=== Returns ===
The TRUE$ if the row was updated successfully, or FALSE$ otherwise.
=== Remarks ===
This method is essentially the same as setting the ROW property except that the controls are //not// updated. This can be useful when updating data columns that are not bound to a control without unnecessarily re-populating those that are, such as just before a WRITE operation for example. SAVEWARN will be set to TRUE$.
=== Example ===
// Example - Update column <20> of the current row without reloading//
// any data-bound controls//
$Insert Logical
RowData = Get_Property( @Window, "ROW" )
RowData<20> = TRUE$
Call Exec_Method( @Window, "UPDATEROW", RowData )
=== See Also ===
WINDOW ROW property, WINDOW ID property, WINDOW WRITE event.
===== WRITEROW method =====
=== Description ===
Writes the data contains in the specified data-bound form to the database.
=== Syntax ===
Status = Exec_Method( CtrlEntID, "READROW", RowID )
=== Parameters ===
^Name ^Required^Description ^
|RowID|No |If specified this is the ID to use when writing the data to the database. If this is different to the ID of the currently loaded row a "Save As" operation is performed, and the data in the key controls updated to reflect this.\\ \\ For a multi-table form RowID should be an @fm-delimited array of keys that matches the order of the tables in the form's join specification:\\ \\ i.e.\\ \\ \\ rowID<1> = Key for primary table\\ rowID<2> = Key for first subsidiary table\\ rowID<3> = Key for second subsidiary table\\ rowID = Key for nth subsidiary table \\
\\ \\ etc.\\ \\ If null (the default) then the data entered in the key-controls is extracted to build the RowID used to write the row.|
=== Returns ===
The WRITE event status. If this is not null then an error has occurred or the user has cancelled the process.
=== Remarks ===
This method triggers the form's WRITE event.
=== Example ===
// Example - Write the data in the current form using a new ID//
RowID = "AS123*EF"
WriteStatus = Exec_Method( @Window, "WRTEROW", RowID )
If BLen( WriteStatus ) Then
// Error or cancelled... //
End
=== See Also ===
WINDOW CLEARONWRITE property, WINDOW ID property, WINDOW ROW property, WINDOW READROW method, WINDOW, CLEAR event, WINDOW WRITE event.
====== WINDOW Events ======
The WINDOW object supports the following events:
^Name ^Description ^
|ACTIVATED |Occurs when a form is activated. |
|ARRANGEICONS |Arranges all minimized MDI Child forms for an MDI frame form. |
|CASCADE |Arranges all MDI Child forms into a cascading layout for an MDI frame form. |
|CLEAR |Occurs when data is cleared from a data-bound form. |
|CLOSE |Occurs when a form is being closed. |
|CREATE |Occurs when a form is created. |
|DBLCLK |Occurs when a user double-clicks the mouse on a form. |
|DELETE |Occurs when data is cleared from a data-bound form. |
|DROPDOWNMENU |Occurs when a top-level item on a form's menu bar is selected. |
|ENDDIALOG |Occurs when an asynchronous dialog box returns a value to its owner form. |
|FORMSTATECHANGED |Occurs when the "form state" of a form changes. |
|INACTIVATED |Occurs when a form becomes inactive. |
|IXLOOKUP |Occurs when a form shows an Index Lookup dialog box. |
|MDICHILDSTATECHANGED|Occurs when the "form state" of an MDI Child form changes. |
|MDISELECT |Occurs when a user selects the "More Windows…" item from the "Window" menu on an MDI Frame form. |
|PAGE |Pseudo-method used to change the current page of a form. |
|QBFABS |Occurs when the form loads a row in a QBF result list using a position index. |
|QBFCLOSE |Occurs when a form's QBF session is closed. |
|QBFFIRST |Occurs when the form loads the first row in a QBF result list. |
|QBFINIT |Occurs when a QBF session is started for a form. |
|QBFLAST |Occurs when the form loads the last row in a QBF result list. |
|QBFLOADID |Occurs when the form loads a row from the QBF result list using a specified key. |
|QBFLOADLIST |Occurs when the form needs to obtain the name of a saved list of keys to load into its QBF result list.|
|QBFNEXT |Occurs when the form loads the next row in a QBF result list. |
|QBFPREV |Occurs when the form loads the previous row in a QBF result list. |
|QBFQUERY |Occurs when the user wished to execute a "raw" QBF SELECT statement |
|QBFRUN |Occurs when the form uses the entered query data to search the database and load the QBF result list. |
|QBFTABLE |Occurs when a form's QBF result list is about to be displayed. |
|READ |Occurs when data is read from the database into a data-bound form. |
|SCALED |Occurs when the scaling factor of a form changes. |
|TILE |Arranges all MDI Child forms into a tiled layout for an MDI frame form. |
|VISUALSTYLECHANGED |Occurs when Window’s visual styling changes. |
|WRITE |Occurs when data is written from a data-bound form to the database. |
The following Common GUI Object events are also supported:
*
* BUTTONDOWN
* BUTTONUP
* CONTEXTMENU
* DROPFILES
* HELP
* HSCROLL
* INITCONTEXTMENU
* LOSTCAPTURE
* MOUSEMOVE
* NOTES
* OMNIEVENT
* OPTIONS
* SYSMSG
* TIMER
* VSCROLL
* WINMSG
The following Container Object API events are also supported:
* PAGECHANGED
* SIZE
===== ACTIVATED event =====
=== Description ===
Occurs when a form is activated.
=== Syntax ===
bForward = ACTIVATED( CtrlEntID, CtrlClassID )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form object receiving the event.|
|CtrlClassID|Type of object receiving the event (always "WINDOW"). |
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
The system event handler for ACTIVATED raises a FORMSTATECHANGED event.
For more information on this event please refer to the Windows documentation regarding WM_ACTIVATE window message on the Microsoft website.
=== Example ===
Function ACTIVATED( CtrlEntID, CtrlClassID )
// Example - ACTIVATED event for an MDI child form to let it parent frame//
// know that is has been activated so it may set its menu items correctly//
MDIFrame = Get_Property( CtrlEntID, "MDIFRAME" )
// Assume that the frame uses an OMNIEVENT handler to respond to the//
// child being activated with a message of "CHILD_ACTIVATED" and the//
// child ID as the first parameter//
EvStatus = Exec_Method( MDIFrame, "SENDEVENT", "OMNIEVENT", |
"CHILD_ACTIVATED", CtrlEntID )
Return TRUE$
=== See Also ===
Common GUI FOCUS property, SYSTEM FOCUS property, WINDOW ACTIVE property, WINDOW FOCUS property, WINDOW FORMSTATECHANGED event, WINDOW INACTIVATED event.
===== ARRANGEICONS event =====
=== Description ===
Arranges all minimized MDI Child forms for an MDI frame form.
=== Syntax ===
bForward = ARRANGEICONS( CtrlEntID, CtrlClassID )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form receiving the event. |
|CtrlClassID|Type of object receiving the event (always "WINDOW")\\ \\ .|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
The system-level event handler for this event calls the MDIICONARRANGE method to perform the arrange operation, and because of this it has been deprecated in favor of that method. It is implemented only for backwards compatibility with earlier versions of OpenInsight.
(Note that this event is not a "true" event as such as it is never triggered by the PS, it can only be "manually" triggered by the developer in an application (typically from an MDI Window menu item) – it is actually a method masquerading as an event).
Please see the documentation for the WM_MDIICONARRANGE message on the Microsoft website for more details.
=== Example ===
N/a.
=== See Also ===
WINDOW MDIICONARRANGE method.
===== CASCADE event =====
=== Description ===
Arranges all MDI Child forms into a cascading layout for an MDI frame form.
=== Syntax ===
bForward = CASCADE( CtrlEntID, CtrlClassID )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form receiving the event.|
|CtrlClassID|Type of object receiving the event (always "WINDOW").|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
The system-level event handler for this event calls the MDICASCADE method to perform the cascade operation, and because of this it has been deprecated in favor of that method. It is implemented only for backwards compatibility with earlier versions of OpenInsight.
(Note that this event is not a "true" event as such as it is never triggered by the PS, it can only be "manually" triggered by the developer in an application (typically from an MDI Window menu item) – it is actually a method masquerading as an event).
Please see the documentation for the WM_MDICASCADE message on the Microsoft website for more details.
=== Example ===
N/a.
=== See Also ===
WINDOW MDICASCADE method.
===== CLEAR event =====
=== Description ===
Occurs when data is cleared from a data-bound form.
=== Syntax ===
bForward = CLEAR( CtrlEntID, CtrlClassID, bSaveKey, bSuppressWarning |
bMaintainFocus )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form receiving the event. |
|CtrlClassID |Type of object receiving the event (always "WINDOW"). |
|bSaveKey |This is a boolean value. If TRUE$ then the controls bound to key columns will not be cleared. |
|bSuppressWarning|This is a boolean value. If TRUE$ then the user will not be warned if they have unsaved changes in the form before it is cleared.|
|bMaintainFocus |This is a boolean value. If TRUE$ then the focus is not moved. By default it is moved to the first control in the tab-order. |
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
The CLEAR event has a system-level handler that performs the following tasks:
* If the form is cleared while browsing a QBF result list, then a QBFNEXT event is raised to move to the next record instead.
* If the form is cleared while the QBFSTATUS property is QBFInitialize then a QBFCLOSE event is raised to clear the form instead.
If neither of these conditions apply the normal CLEAR process is followed:
* If the form's SUPPRESSSAVEWARN property is FALSE$ //and// the bSuppressWarning parameter is FALSE$ then:
* Update the form's SAVEWARN property if data in the currently focused control has changed.
* Check the SAVEWARN property and warns the user of any unsaved changes if the bSuppressWarning flag is FALSE allowing the operation to be cancelled. If so, then the clear operation is stopped here.
* Reset the form's SAVEWARN property to FALSE$
* Unlock any data-rows locked by the form.
* If bSaveKey is FALSE$ then clear data in the data-bound key controls
* Clear the contents of the data-bound controls.
* Reset the form's NEWROW property to FALSE$
* If bMaintainFocus is FALSE$ move the focus to the first control in the form's tab order.
A CLEAR event will be triggered by the system in the following circumstances:
* From a READ event, if the read operation is cancelled or fails.
* From a WRITE event, if the CLEARONWRITE property is TRUE$.
* From a DELETE event.
Applications needing to execute a clear operation programmatically should use the WINDOW CLEARROW method rather than using the Send_Event stored procedure to invoke a CLEAR event directly (as was the case in previous versions of OpenInsight).
=== Example ===
Function CLEAR( CtrlEntID, CtrlClassID, bSaveKey, bSuppressWarning, bMaintainFocus )
// Example - CLEAR event script that removes some information from a STATIC//
// control called TXT_INFO that is not data-bound.//
$Insert RTI_SSP_Equates
// First let the system event handler perform the clear in case the user cancels it//
Call Set_EventStatus( SETSTAT_OK$ )
Call Forward_Event( bSaveKey, bSuppressWarning, bMaintainFocus )
If Get_EventStatus() Then
// Assume cancelled or error//
Null
End Else
Call Set_Property_Only( @Window : ".TXT_INFO", "TEXT", "" )
End
// Return FALSE$ to stop the event chain as we've already forwarded to the//
// system CLEAR event handler above.//
Return FALSE$
=== See Also ===
WINDOW CLEARROW method, WINDOW READ event, WINDOW SYSMSG event, WINDOW WRITE event.
===== CLOSE event =====
=== Description ===
Occurs when a form is being closed.
=== Syntax ===
bForward = CLOSE( CtrlEntID, CtrlClassID, CancelFlag, CloseFlags )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form receiving the event. |
|CtrlClassID|Type of object receiving the event (always "WINDOW"). |
|CancelFlag |A boolean value used to check the response from SYSMSG calls. This is always set to FALSE$ when the CLOSE event is executed, it can be set to TRUE$ if the user cancels the CLOSE attempt.|
|CloseFlags |This is an @Fm-delimited array with this following structure (currently there is only one field):\\ \\ \\ <1> If TRUE$ then suppress SAVEWARN processing\\
|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
The system-level CLOSE event handler performs the following tasks:
* If the suppress SAVEWARN flag is not set (or the form's SUPPRESSSAVEWARN property is FALSE$) then:
* Update the form's SAVEWARN property if data in the currently focused control has changed.
* Check the SAVEWARN property and warn the user of any unsaved changes, giving them the opportunity to save, ignore or cancel:
* Choosing save performs a write operation and proceeds to close the form if successful, otherwise the close operation is stopped.
* Choosing cancel stops the form from closing.
* The CLOSE quick event handler is executed (if defined) and the event status checked – if it returns anything other than FALSE$ the operation is cancelled.
* Any forms owned by the current form are closed. If any owned forms cannot be closed the entire close operation is cancelled.
* If the current form is an MDI Frame form, then any MDI Child forms are closed. If any child forms cannot be closed the entire close operation is cancelled.
* All database locks held by the form are released.
* The form is removed from screen via the HIDE method.
* The form is terminated via the End_Window stored procedure.
Care should be taken when closing a form from an event that is raised from one of the form's own child controls. In this case it is always better to set the CloseAsync flag in the CLOSE method so that the current event has chance to finish executing before the form is destroyed.
Applications needing to execute a close operation programmatically should use the WINDOW CLOSE method rather than using the Send_Event or Post_Event stored procedures to invoke a CLOSE event directly (as was the case in previous versions of OpenInsight).
=== Example ===
Function CLOSE( CtrlEntID, CtrlClassID, CancelFlag, CloseFlags )
// Example - CLOSE event script - let the system handler execute via a call //
// to formward_event, and cleanup resources if the form was closed.//
$Insert RTI_SSP_Equates
Call Set_EventStatus( STESTAT_OK$ )
Call Forward_Event( CancelFlag, CloseFlags )
If Get_EventStatus() Then
// Form wasn't closed//
Return FALSE$
End
// Final check - just in case someone forgot to set the EventStatus//
If Get_Property( CtrlEntID, "HANDLE" ) Else
// Form wasn't closed//
Return FALSE$
End
// Now be very careful, as the form no longer exists, so try not to //
// reference it from this point onwards (especially any synthetic //
// properties)//
GoSub CleanAllTheThings
// Return FALSE$ to stop the event chain as we've already forwarded to the//
// system CLOSE event handler above.//
Return FALSE$
=== See Also ===
WINDOW SAVEWARN property, WINDOW CLOSE method, WINDOW HIDE method, End_Window stored procedure.
===== CREATE event =====
=== Description ===
Occurs when a form is created.
=== Syntax ===
bForward = CREATE( CtrlEntID, CtrlClassID, CreateParam )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form receiving the event.|
|CtrlClassID|Type of object receiving the event (always "WINDOW").|
|CreateParam|Data passed from the method that created the form. |
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
There is no system level event handler for CREATE.
=== Example ===
Function CREATE( CtrlEntID, CtrlClassID, CreateParam )
// Example CREATE event. Assume this is a non-visible data bound form and we have//
// been passed the key to load in the CreateParam argument//
CloseForm = FALSE$
If BLen( CreateParam ) Then
EvStatus = Exec_Method( @Window, "READROW", CreateParam )
If BLen( EvStatus ) Then
CloseForm = TRUE$ ; // Read Failed - close the form//
End
End
If CloseForm Then
Call Exec_Method( @Window, "CLOSE", TRUE$, TRUE$ ) ); // Async//
End Else
Call Exec_Method( @Window, "SHOW" ); // Loaded OK - show the form//
End
Return Not( CloseForm )
=== See Also ===
SYSTEM SHOWDIALOG method, SYSTEM STARTFORM method, WINDOW SHOWDIALOG method, WINDOW STARTFORM method, WINDOW STARTMDICHILDFORM method, Dialog_Box stored procedure, Start_MDIChild stored procedure, Start_Window stored procedure.
===== DBLCLK event =====
=== Description ===
Occurs when the user double-clicks the mouse button on a form.
=== Syntax ===
bForward = DBLCLK( CtrlEntID, CtrlClassID, CtrlKey, ShiftKey, MouseButton )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form receiving the event. |
|CtrlClassID|Type of object receiving the event (always "WINDOW" ). |
|CtrlKey |TRUE$ if the Ctrl key was pressed down when the double-click was triggered, FALSE$ otherwise. |
|ShiftKey |TRUE$ if the Shift key was pressed down when the double-click was triggered, FALSE$ otherwise. |
|MouseButton|Integer specifying which mouse button was double-clicked:\\ \\ "0" - Left button or middle button\\ \\ "1" - Right button|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
There is no system-level event handler for DBLCLK.
=== Example ===
Function DBLCLK( CtrlEntID, CtrlClassID, CtrlKey, ShiftKey, MouseButton )
// Example DBLCLK event. If the Ctrl key is down then load a non-modal, owned//
// child form//
If CtrlKey Then
Call Exec_Method( @Window, "STARTFORM", "MY_INFO_FORM" )
End
Return TRUE$
=== See Also ===
Common GUI BUTTONDOWN event, Common GUI BUTTONUP Event, Common GUI LOSTCAPTURE event, Common GUI MOUSEMOVE event.
===== DELETE event =====
=== Description ===
Occurs when the data row loaded into a data-bound form is deleted from the database.
=== Syntax ===
bForward = DELETE( CtrlEntID, CtrlClassID, bSuppressWarning )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form receiving the event. |
|CtrlClassID |Type of object receiving the event (always "WINDOW"). |
|bSuppressWarning|This is a boolean value. If TRUE$ then the delete operation should be unconditional, otherwise, the user will be warned about the delete and given the opportunity to cancel.|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
The DELETE event has a system-level handler that performs the following tasks:
* Checks the see if all loaded data rows are locked. If not, the user is warned and the delete operation is aborted.
* If the bSuppressWarning parameter is FALSE$ the form displays a message warning the user that data is about to be deleted, giving them an opportunity to cancel the process.
* The data row is deleted from the database.
* The SAVEWARN property is reset to FALSE$.
* If the row was deleted while browsing a QBF result list, the list is updated and the next item in the list loaded, otherwise a CLEAR event is raised to reset the form's data-bound controls to their default state.
A DELETE event is never triggered by the system – it is only triggered by user action or developer code.
Applications needing to execute a delete operation programmatically should use the WINDOW DELETEROW method rather than using the Send_Event stored procedure to invoke a DELETE event directly (as was the case in previous versions of OpenInsight).
=== Example ===
Function DELETE( CtrlEntID, CtrlClassID, bSuppressWarning )
// Example - DELETE event script that checks to see if the user has rights to//
// perform the delete//
$Insert RTI_SSP_Equates
$Insert EvErrors
IsOK = TRUE$
GoSub IsTheUserOKToDeleteRows ; // whatever//
If IsOK Else
// Failed the check - warn the user and stop here//
Call Exec_Method( @Window, "SHOWMESSAGE", "What do you think you are doing Dave?" )
Call Set_EventStatus( SETSTAT_ERR$, EV_VALIDERR$ )
Return FALSE$
End
// Assume single table form.//
TableID = Get_Property( @Window, "TABLE" )
RowID = Get_Property( @Window, "ID" )
// Now let the system event handler perform the DELETE in case we have a problem//
Call Set_EventStatus( SETSTAT_OK$ )
Call Forward_Event( bSuppressWarning )
If Get_EventStatus() Then
// Assume error or cancelled//
Null
End Else
// Update the audit log...//
Call Update_Some_Audit Log( @UserName : " deleted" : TableID : " " : RowID )
End
// Return FALSE$ to stop the event chain as we've already forwarded to the//
// system DELETE event handler above.//
Return FALSE$
=== See Also ===
WINDOW SAVEWARN property, WINDOW CLEARROW method, WINDOW DELETEROW method, WINDOW CLEAR event, WINDOW SYSMSG event.
===== DROPDOWNMENU event =====
=== Description ===
Occurs when a top-level item on a form's menu bar is selected and gives a chance for the application to modify the menu before it is displayed.
=== Syntax ===
bForward = DROPDOWNMENU( CtrlEntID, CtrlClassID, menuID, menuStruct )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the form object receiving the event. |
|CtrlClassID|Type of object receiving the event (always "WINDOW"). |
|MenuID |Contains the fully qualified name of the top-level menu item to "drop-down". |
|MenuStruct |A dynamic array containing the executable structure of the menu.\\ \\ Note that this structure does //not// include the usual menu header fields.|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
The system-level event handler for DROPDOWNMENU performs the following tasks:
* The DROPDOWNMENU quick event handler is executed (if defined) and the event status checked – if it returns anything other than FALSE$ the operation is cancelled.
* If the menu item being selected is the "Window" item on an MDI Frame form then the details of the first ten MDI child forms are appended to the MenuStruct array – this is so they may be activated from the dropdown menu. If there are more than ten then a "More…" item is also appended which will trigger an "MDISELECT" event when selected.
* The dropdown menu is displayed via the TRACKDROPDOWNMENU method.
=== Example ===
Function DROPDOWNMENU( CtrlEntID, CtrlClassID, menuID, menuStruct )
// Example DROPDOWNMENU event code - check to see which clipboard items should//
// be enabled if this is the "Edit" menu item//
$Insert PS_Menu_Equates
$insert PS_Equates
Begin Case
Case ( MenuID == @Window : ".MENU.EDIT" )
// Get the current focus and it's EditState//
FocusID = Get_Property( "SYSTEM", "FOCUS" )
EditState = Get_Property( FocusID, "EDITSTATEFLAGS" )
xCount = FieldCount( MenuStruct, @Vm )
For X = 5 to XCount
If ( MenuStruct<0,X>[1,1] == "@" ) Then
Null ; // Ignore - it's an imagelist header//
End Else
If ( MenuStruct<0,X,MENUPOS_TYPE$> == MENUTYPE_ITEM$ ) Then
ItemName = MenuStruct<0,X,MENUPOS_NAME$>[-1,"B."]
DisableItem = FALSE$
Begin Case
Case ( ItemName = "UNDO" )
DisableItem = ( EditState\\ <1> Save\\ <2> SaveAs\\ <3> Clear\\ <4> Delete\\ <5> LoadPrevRow\\ <6> Print\\ <7> PrintPreview\\ <8> Close\\ <20> QBFInit\\ <21> QBFRun\\ <22> QBFFirst\\ <23> QBFPrev\\ <24> QBFNext\\ <25> QBFLast\\ <26> QBFPosition\\ <27> QBFTable\\ <28> QBFLoadList\\ <29> QBFGetQuery\\ <30> QBFClose\\
|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
This event is only raised if the form’s ALLOWFORMSTATEEVENTS property is TRUE$.
The system-level event handler for FORMSTATECHANGED performs the following tasks:
* Builds the default FormState array based on the state of the row data loaded into the form.
* Executes the FORMSTATECHANGED quick event handler (if defined) and checks the event status – if it returns anything other than FALSE$ the operation is cancelled.
* Sets the ENABLED state for a default set of items based on the flags in the FormState array parameter.
* If the form is an MDI Child then an MDICHILDSTATECHANGED event is raised for the parent MDI frame.
The default list of items affected by the form state is:
*
* MENU.FILE.SAVE
* MENU.FILE.SAVE_F9
* MENU.FILE.SAVE_ROW
* MENU.FILE.SAVE_AS
* MENU.FILE.CLEAR
* MENU.FILE.CLEAR_ROW
* MENU.FILE.DELETE
* MENU.FILE.DELETE_ROW
* MENU.FILE.PRINT
* MENU.FILE.PRINT_PREVIEW
* MENU.FILE.CLOSE
* MENU.EDIT.LOAD_PREVIOUS_DATA
* MENU.EDIT.LOAD_PREVIOUS_ROW
* MENU.QBF.INITIALIZE
* MENU.QBF.EXECUTE
* MENU.QBF.LOAD_FROM_EXTERNAL_LIST
* MENU.QBF.LOADLIST
* MENU.QBF.GETQUERY
* MENU.QBF.NEXT
* MENU.QBF.PREVIOUS
* MENU.QBF.FIRST
* MENU.QBF.LAST
* MENU.QBF.ABSOLUTE
* MENU.QBF.GOTO_ID
* MENU.QBF.TABLE
* MENU.QBF.CLOSE
=== ===
Equates for use with the FORMSTATECHANGED event can be found in the RTI_FORMSTATE_EQUATES insert record.
=== Example ===
Function FORMSTATECHANGED( CtrlEntID, CtrlClassID, EventSource, FormState )
// Example - Set the state of some buttons based on the state of the form, and//
// set the Delete flag to FALSE$ if the user is not an administrator//
// (This assumes that this code runs _before_ the system event//
// handler!)//
$Insert RTI_FormState_Equates
$Insert Logical
// Check the user//
If ( @Admin == 0 ) Then
// Not an Admin - no deleting//
FormState\\ <1> Mode – this can be either "MULTI" or\\ "SINGLE" (the default). If "MULTI"\\ then the user may select more than\\ one row to return.\\ \\ <2> Contains the name of the control to \\ return the selected row IDs to. If \\ null then the row IDs are loaded into\\ the form as a QBF result list.\\ \\ This can be virtual name like "@WINDOW"\\ or "@SELF" that are used in normal quick\\ event programming.\\ \\ <3> If a control name is specified in\\ field <2> this field contains the name \\ of the property to set such as "TEXT"\\ \\
|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
The system-level IXLOOKUP event handler performs the following tasks:
* Parses and verifies the parameters passed to the event.
* Constructs a dialog box to display the search columns.
* Constructs a results popup to allow the user to select one or more rows from the filtered search data.
* Returns the selected rows to the specified control or the form's QBF result list.
=== Example ===
N/a.
=== See Also ===
WINDOW QBFLIST property, WINDOW SHOWINDEXLOOKUP method.
===== MDICHILDSTATECHANGED event =====
=== Description ===
Occurs for an MDI Frame form when the “state” of an MDI Child form changes. The term state refers to attributes that can affect the visual state of the form and the enabled state of its controls, such as being activated, reading data, clearing data etc. These actions usually require common UI menu items and buttons to be updated, for example Save, Clear and Delete menu items and buttons that perform the same actions.
This event is raised from an MDI Child form’s FORMSTATECHANGED event.
=== Syntax ===
bForward = MDICHILDSTATECHANGED( CtrlEntID, CtrlClassID, EventSource, |
FormState )
=== Parameters ===
^Name ^Description ^
|CtrlEntID |Fully qualified name of the MDI Frame form receiving the event. |
|CtrlClassID|Type of object receiving the event (always "WINDOW"). |
|EventSource|Name of the event that triggered the form state change. |
|FormState |An @Fm-delimited array of boolean flags that denote the proposed enabled state of various common menu and toolbuttons – this is set by the originating FORMSTATECHANGED event:\\ \\ \\ <1> Save\\ <2> SaveAs\\ <3> Clear\\ <4> Delete\\ <5> LoadPrevRow\\ <6> Print\\ <7> PrintPreview\\ <8> Close\\ <20> QBFInit\\ <21> QBFRun\\ <22> QBFFirst\\ <23> QBFPrev\\ <24> QBFNext\\ <25> QBFLast\\ <26> QBFPosition\\ <27> QBFTable\\ <28> QBFLoadList\\ <29> QBFGetQuery\\ <30> QBFClose\\
|
=== Returns ===
TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level.
=== Remarks ===
This event is only raised if the MDI Child form’s ALLOWFORMSTATEEVENTS property is TRUE$.
The system-level event handler for MDICHILDSTATECHANGED performs the following tasks:
* If the EventSource is a CLOSE event and the last MDI Child form is being closed the flags in the FormState array are all set to FALSE$
* Executes the MDICHILDSTATECHANGED quick event handler (if defined) and checks the event status – if it returns anything other than FALSE$ the operation is cancelled.
* Sets the ENABLED state for a default set of items based on the flags in the FormState array parameter.
The list of items affected by the default form state handler is:
*
* MENU.FILE.SAVE
* MENU.FILE.SAVE_F9
* MENU.FILE.SAVE_ROW
* MENU.FILE.SAVE_AS
* MENU.FILE.CLEAR
* MENU.FILE.CLEAR_ROW
* MENU.FILE.DELETE
* MENU.FILE.DELETE_ROW
* MENU.FILE.PRINT
* MENU.FILE.PRINT_PREVIEW
* MENU.FILE.CLOSE
* MENU.EDIT.LOAD_PREVIOUS_DATA
* MENU.EDIT.LOAD_PREVIOUS_ROW
* MENU.QBF.INITIALIZE
* MENU.QBF.EXECUTE
* MENU.QBF.LOAD_FROM_EXTERNAL_LIST
* MENU.QBF.LOADLIST
* MENU.QBF.GETQUERY
* MENU.QBF.NEXT
* MENU.QBF.PREVIOUS
* MENU.QBF.FIRST
* MENU.QBF.LAST
* MENU.QBF.ABSOLUTE
* MENU.QBF.GOTO_ID
* MENU.QBF.TABLE
* MENU.QBF.CLOSE
=== ===
Equates for use with the MDICHILDSTATECHANGED event can be found in the RTI_FORMSTATE_EQUATES insert record.
=== Example ===
Function MDICHILDSTATECHANGED( CtrlEntID, CtrlClassID, EventSource, FormState )
// Example - Set the state of some buttons based on the state of the child form//
$Insert RTI_FormState_Equates
$Insert Logical
ObjxArray = @Window : ".BTN_SAVE"
PropArray = "ENABLED"
DataArray = FormState