class SubForm
A subclassed Form which behaves as a non-mdi form. A subform can be a child of a form or another subform object.
Syntax
[<oRef> =] new SubForm(<parent oRef>[<title expC>])
<oRef>
A variable or property in which to store a reference to the newly created SubForm object.
<parent oRef>
A variable or property containing an object reference to the form, or subform, that is to be the parent of the new subform. Determines the read-only value of the subform's parent property.
<title expC>
An optional title for the SubForm object. If not specified, the title will be "SubForm".
Properties
The following tables list the properties, events, and methods of the SubForm class.
Property |
Default |
Description |
|
The currently active control | |
false |
Whether dragged objects can be dropped on the subform's surface | |
false |
Whether the form automatically centers on-screen when it is opened | |
false |
Whether the form automatically sizes itself to display all its components | |
|
Background image | |
SUBFORM |
Identifies the object as an instance of the SubForm class | |
(SUBFORM) |
Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName | |
false |
Whether the edge of the form has the sunken client appearance | |
BtnFace |
Background color | |
|
An array containing object references to the components on the subform | |
true |
Whether pressing Esc closes the subform | |
|
The first component on the subform in the z-order | |
|
The Windows handle for the subform's client area | |
|
An icon file or resources that displays when the subform is minimized | |
|
Whether the subform was instantiated by the Form designer | |
true |
Whether the subform can be maximized when not MDI | |
Chars |
Units of measurement (0=Chars, 1=Twips, 2=Points, 3=Inches, 4=Centimeters, 5=Millimeters, 6=Pixels) | |
true |
Whether the subform can be minimized when not MDI | |
true |
Whether the subform is moveable when not MDI | |
|
The object that’s about to receive focus | |
false |
Determines whether custom control, datamodule, menu or procedure files associated with a subform are loaded in the persistent mode. | |
|
The subform’s Popup menu object | |
true |
Whether to refresh the subform after all form-based navigation and updates | |
|
The primary rowset | |
Off |
When a scroll bar appears for the subform (0=Off, 1=On, 2=Auto, 3=Disabled) | |
|
The current position of the horizontal scrollbar in units matching the form or subform's current metric property | |
|
The current position of the vertical scrollbar in units matching the form or subform's current metric property | |
true |
Whether to show tool tips | |
true |
Whether the subform is resizeable when not MDI | |
false |
Whether the subform has the smaller palette-style title bar when not MDI | |
true |
Whether the subform’s system menu icon and close icon are displayed when not MDI | |
|
The text that appears in the subform’s title bar | |
false |
Whether the subform stays on top when not MDI | |
false |
Whether to use the default table navigation popup when no popup is assigned as the subform’s popupMenu. | |
|
The query or table on which the subform is based | |
Normal |
The state of the window (0=Normal, 1=Minimized, 2=Maximized)
| |
Event |
Parameters |
Description |
|
When attempting to close subform; return value allows or disallows closure |
<workarea expN> |
When attempting to navigate in work area; return value allows or disallows leaving current record |
|
After a new record is added |
<workarea expN> |
After leaving a record that was changed, before onNavigate | |
|
After the subform has been closed |
<left expN> |
When the mouse enters the subform's display area during a Drag&Drop operation |
|
When the mouse leaves the subform's display area without having dropped an object | |
<left expN> |
While the mouse drags an object over the subform's display area during a Drag&Drop operation | |
<left expN> |
When the mouse button is released over the subform's display area during a Drag&Drop operation |
|
After the subform has been moved | |
<workarea expN> |
After navigation in a work area | |
<control ID expN> |
After the subform is submitted | |
<expN> |
After the subform is resized or changes windowState
| |
Method |
Parameters |
Description |
|
Abandons changes to the current record | |
|
Starts append of new record | |
|
Closes the subform | |
|
Checks whether the current record buffer has changed | |
|
Loads and opens the subform | |
|
Returns the highest pageNo of any component | |
|
Prints the subform | |
|
Redraws the subform | |
|
Saves changes to the current or new record |
<horizontal expN>, <vertical expN> |
Programatically scrolls the client area (the contents) of a subform |
<expL> |
Displays or hides the formatting toolbar
|
The following table lists the common properties, events, and methods of the SubForm class:
Description
Parenting the subform to a form, or another subform, restricts display of the subform to within the client area of the parent form. When a parent form is closed, it allows the parent form to also close the subform.
A form or subform, containing one or more subforms, internally tracks which subform (if any) is currently active. When a subform is active, that subform has focus. When a form object is given focus, the active subform will lose focus and be set to inactive. Clicking on a subform, or subform object, will activate the subform and set focus either to the subform or the selected object.
A form's canClose event will call the canClose event of any child subforms. If a subform's canClose event returns false, the form's canClose event will also return false.
Subforms are not currently supported by the Form Designer. However, you can design a form in the Form Designer and edit the streamed code to designate it a Subform.