Form

The Form acts as a full-sized window holding UI gadgetry. On small devices, Forms will typically fill up the full screen.

Form Looks

The following looks are available:

0 Blank. A plain form.

1 Gray. A gray rectangle.

2 Bordered. Drawn with a border.

Form Properties

Standard Properties
borderBottom, borderLeft, borderRight, borderTop, caption, children, class, enabled, height, left, look, numChildren, parent, proto, sizeHControl, sizeVControl, tile, tileHAlign, tileHInset, tileLayout, tileSpacing, tileVAlign, tileVInset, top, version, visible, width.
enabled: If the form is disabled and holds the system focus, the window itself will become the system focus.
height, width: These properties are read-only, and are based on the size of the screen.
left, top: These properties are read-only and zero.
sizeHControl, sizeVControl: Only SIZE_AS_NEEDED and SIZE_AS_SPECIFIED will be supported. SIZE_AS_NEEDED will only be partially supported: when the component becomes visible and their height or width is the minimum allowable value, the component will size itself to a default value.
parent: The only valid parent for a form is the null component, also known as "app."
visible: Setting a Form visible not only makes it visible, but also brings it to the front, as if you had invoked the BringToFront() action.

focus component (must be a child or descendant of the Form (or a null component))
This property holds the component that the window will set as the active system focus when the window becomes active. The property will hold the component with the system focus as long as the system focus remains within the window.

If the value of the focus property is the null component and the window is becoming visible or becoming active, then the window will set the system focus to the first child component that will accept it.

When the system focus is in the window, setting the focus property will also set the system focus.

Note that a popped-up Popup window, though a child of the window, will not show up in its focus property. This is because the popped-up Popup is a window itself, and keeps track of its own focus.

Form Events

_aboutToClose()

_aboutToClose( self AS form )

This event is generated when the Form is about to go away (when visible has changed from one to zero).

Pass:

self form
The Form experiencing the event.

_aboutToOpen()

_aboutToOpen( self AS form )

This event is generated when the Form is about to appear (when visible has changed from zero to one).

Pass:

self form
The Form experiencing the event.

_activeChanged()

_activeChanged( self AS form, gained AS integer )

This event is generated when the form becomes the active form or stops being the active form.

Passed:

self form
The component experiencing the event.

gained integer
If this argument is non-zero, then this form has just become the active form. Otherwise, it has just ceased to be the active form.

Form Actions

BringToFront()

BringToFront()

This action causes the Form, if it is visible, to come to the front of the screen.

Pass:

Nothing.