Form Functions and Methods
Alpha Five provides the following Form functions.
Method |
| Description |
V5 | Returns a CR-LF delimited list of all saved forms. | |
V5 | Returns the filename of the file contains the named form. | |
V6 | Opens the named layout in the appropriate editor. | |
V5 | Opens the default form for a table or set. | |
V6 | Closes a form, runs Xbasic code, then restores the form. | |
V5 | Returns the current setting of the Form > Allow Edits, or Browse > Allow Edits menu command. | |
V5 | Closes a form if it is open. | |
V5 | Deletes the named Form. | |
V5 | Renames or copies the named Form. | |
V5 | Displays a form as it would appear when printed. | |
V5 | Creates the selected forms and then displays the Print dialog box. |
Alpha Five provides the following Form methods based on the default FORM object.
Method |
| Description |
V5 | Prints Layout_Name to file in the .PDF format. | |
V5 | Creates and displays a new form for a table or set. | |
V5 | Deletes Form_Name. | |
V5 | Opens Form_Name as a dialog box. | |
V5 | Loads Form_Name into memory and returns the <FORM> object pointer. | |
V5 | Displays the form and the selected records in the Print Preview dialog. | |
V5 | Obsolete, see PRINT_FORM(). .PRINT()creates the selected forms and then displays the Print dialog box. | |
V5 | Prints Layout_Name to file in the specified format. If no format is specified, the .PDF format is used. | |
V5 | Emails a layout as an attached file of type Format. | |
V5 | Opens Form_Name and returns the <FORM> object pointer to the form window. Has some features only supported by version 6. | |
V5 | Opens Form_Name and returns the <FORM> object pointer to the form window. | |
V5 | Opens a form and displays the current record in an embedded browse. |
Alpha Five provides the following form methods. Prefix these methods with either:
the name of the form
topparent, when working within the form
the <FORM> pointer returned by the FORM.LOAD(), FORM.VIEW(), or FORM.VIEWQUERIED() methods.The following script examples, attached to a button on the Customer Information form, switch the form to browse view
Using an alias is desirable when working within the form.
parentform.browse_view() topparent.browse_view() |
Using the form name can cause problems, because it can change.
customer_information.browse_view() |
Using a pointer is necessary when working outside the form.
dim frm as P frm = form.view("Customer Information") frm.browse_view() |
Method |
| Description |
V5 | Sets focus to the object. | |
V5 | Returns the name of the control (or column in the case of a Browse) with focus. | |
V5 | Returns the address of the deepest control that has focus. | |
V5 | Returns the name of the control which previously had focus. | |
V5 | Returns the name of previously active object, drilling down into container objects. | |
V5 | Sets the Allow Changes flag. When the flag is .T., data can be edited. | |
V5 | Returns .T. (TRUE) if the form allows editing. | |
V5 | Sets the base filter and order expressions for a form. | |
V5 | Toggles a form window into a browse window. | |
V5 | Activates a button and runs the buttons OnPush event. | |
V5 | Cancels any changes made to the current record before the records is saved. Works for forms and browses. | |
V5 | Puts a form into change mode, just as if the user had done so by beginning to type into any field. | |
V5 | Returns an object pointer to the Nth child of the object, or the child object called Object_Name. | |
V5 | Returns a CR-LF separated list of all the child objects on the form, in tab order. | |
V5 | Returns the number of objects that a container object contains. Returns zero if the object is not a container. | |
V5 | Returns the class (i.e., type) of the object. | |
V5 | Closes the form or browse window. | |
V5 | Saves the current records. | |
V5 | Copies values from the previous record into the current record. | |
V5 | Copies values from the corresponding field in the previous record into the current field. | |
V5 | Returns the position of the cursor on the form. | |
V5 | Sets the position of the cursor on the form. | |
V5 | Returns the mode of the form. | |
V5 | Deletes the current record. | |
V5 | Dials the phone number in the control that currently has focus. | |
V5 | Returns the name of the dictionary file that contains the form. | |
V5 | Makes a form unable to receive focus. May also gray the object. Works with fields, buttons, check boxes, etc. | |
V5 | Moves the focus down as if the user had pressed the Down key. Works with forms. | |
V5 | Creates a new record that is a duplicate of the current record. Moves focus to the new record. | |
V5 | Makes an object able to receive focus. | |
V5 | Interprets a string as Xbasic code. | |
V5 | Moves to the first record in the current query. | |
V5 | Moves to the last record in the current query. | |
V5 | Moves to the next record in the current query. | |
V5 | Moves to the previous record in the current query. | |
V5 | Returns the current filter expression for the form. | |
V5 | Does a Find by Key for value. If value is not specified, the built-in Find dialog is displayed. | |
V5 | Displays the Find and Replace dialog box. | |
V5 | Puts the form into Find by Form mode. | |
V5 | Clears entries from the Find by Form mode form. | |
V5 | Cancels the Find by Form mode. | |
V5 | Repeats the Find by Form, finding the next record. | |
V5 | Repeats the Find by Form, finding the previous record. | |
V5 | Runs the Find by Form. | |
V5 | A high level approach to displaying the Find by Key dialog box that allows you to customize its appearance and preset its filter. | |
V5 | Returns a pointer to the container of the object that has focus. | |
V5 | Returns .T. (TRUE) if the form supports the specified method. | |
V5 | Hides an object. | |
V5 | Returns the name of the form's icon. | |
V5 | Returns the name of the current primary index or query. | |
V5 | Returns a pointer to the current primary index or query. | |
V5 | Selects an index or query list as the primary index. | |
V5 | Sets the primary index for the form. | |
V6 | Displays the Primary Index or Query dialog box. | |
V5 | Returns .T. if the object is the last object on the form, as specified in the forms prompt order. | |
V5 | Returns .T. (TRUE) if the form is visible. | |
V5 | Returns the kind of object represented by a form. | |
V5 | Returns the name of the last button pressed when a form is opened as a dialog. | |
V5 | Moves the focus to the left as if the user had pressed the Left key. | |
V5 | Displays the Locate dialog box. | |
V5 | Finds the next record with a field value matching value. If field is not specified, all fields are searched. Otherwise, only the specified field is searched. | |
V5 | Finds the previous record with a field value matching value. If field is not specified, all fields are searched. Otherwise, only the specified field is searched. | |
V5 | Marks the current record. | |
V5 | Maximizes the form window. | |
V5 | Displays the named menu. | |
V5 | Displays or removes a checkmark next to a menu entry. | |
V5 | Enables or disables (grays) a menu entry. | |
V5 | Enables and removes any checkmarks from a menu entry. | |
V5 | Minimizes the form or browse window. | |
V5 | Returns the current mode of the form. Possible modes are: VIEW, CHANGE, ENTER, QUERY and FIND. | |
V5 | Displays the Multi-Select Records dialog box. | |
V5 | Returns the object name. | |
V5 | Displays the Goto which field? dialog box. | |
V5 | Enters a new record into a form or a browse. | |
V5 | Moves the focus to the next control in the tab order as if the user had pressed the Tab key. Works with forms and browses. | |
V5 | Returns the current order expression for the form. | |
V5 | Sets the name of the file to be printed. It returns the name, if any, of the file currently set to be printed. | |
V5 | Moves the focus to the previous control in the tab order as if the user had pressed the Shift-Tab key. | |
V5 | Sets the printer configuration, and optionally, saves the current configuration before overwriting it. | |
V5 | Displays the Query by Expression dialog. | |
V5 | Switches a form to Query by Form mode. | |
V5 | Opens the Query by Table window. | |
V5 | Clears entries from the Query by Form mode form. | |
V5 | Exits from Query by Form mode. | |
V5 | Displays the Query Genie dialog box. | |
V5 | Switches a form to the Query by Form mode specified by mode. | |
V5 | Runs the query specified in the Query by Form window. | |
V5 | Applies a query to the current form. | |
V5 | Exports the currently selected records to Excel. | |
V5 | Performs the same action as the Quick Filter command. | |
V5 | Opposite of the .QUICK_SEARCH() methods. Finds all records that do NOT match the value in the current control. | |
V5 | Performs the same action as the Quick Sort command. Works with forms and browses. | |
V5 | Returns a count of the matching records, as if you had clicked the Quick Filter icon. | |
V5 | Sorts the table or set on the indicated field and then displays it in the current form. | |
V5 | Displays the Custom Sort dialog box. | |
V5 | Filters the records in a form based on the value of a field. | |
V5 | Displays the multi-field Quick Filter dialog. | |
V5 | Displays the specified record number. | |
V5 | Returns the number of records displayed by the form. | |
V5 | Returns the reference expression to reconstruct a reference to the object. | |
V5 | Forces a control to re-fetch data from its data source, and then to repaint itself. Works with all controls. | |
V5 | Refreshes all the fields on the form. | |
V5 | Reloads the form. | |
V5 | Restores a minimized or maximized window to normal size. Works with form and browse windows. | |
V5 | Re-fetches all data for the form and repaints the form. Works with forms and browses. | |
V5 | Moves the focus to the right as if the user had pressed the Right key. | |
V5 | Displays the right-click for the selected object. | |
V5 | Runs the saved Query operation called Query_Name. This method is equivalent to the user selecting the Query, Run saved query menu option. | |
V5 | Selects text in the current field from Start_Position for Length characters. | |
V5 | Emails the form. | |
V5 | Returns the session handle associated with the object. | |
V5 | Indicates that the form layout has been changed. | |
V5 | Shows an object that may previously have been hidden using the .HIDE() method. Works with fields, buttons, check boxes, text, lines and most other objects on forms. | |
V5 | Turns off the current query and shows all records in the table (subject to any base filter that may have been specified in the form or browses Filter/Order properties). | |
V5 | Opens the memo editor for a memo field. | |
V5 | Returns the size of the window in inches (width x height). | |
V5 | Displays the Select Filter dialog box. | |
V5 | Displays the Spellchecker dialog box. | |
V5 | Replaces the current form with a different form. | |
V5 | Returns the tab number of the tab page that has focus. | |
V5 | Activates the specified tab page on a tab control on a form. | |
V5 | Returns a pointer to the primary table that the form is based on. | |
V5 | Switches the form to browse mode. | |
V5 | Loads and displays the selected toolbar. | |
V5 | Enables or disables the specified item on the control bar. | |
V5 | Returns the type of data bound to an object. | |
V5 | Un-marks the current record. | |
V5 | Moves the focus up as if the user had pressed the Up key. | |
V5 | Returns a pointer to a dot variable that contains the values of the selected variables. | |
V6 | Sets the location of the form on the screen. | |
V6 | Sets the stacking position of a form. |
See Also