Dialog

A Dialog acts as a floating "dialog box" or window, often holding a number of components for the user to interact with. Some dialogs are meant to appear only temporarily: alert boxes, file selectors, etc. Others may stay up for a while: toolboxes, command windows, etc.

If your Dialog will contain one or more Buttons in a reply bar, you may wish to use the default, closeDialog, cancel, or destructive properties for some of these buttons.

Dialog Looks

The following looks are supported:

0 Default Dialog

An unremarkable dialog box

1 Tool Dialog

Drawn in the style of a tool dialog window, somewhat round and thick

2 Fit Note Pad

This has a corner folded up on the bottom right and looks as if its sitting on top of a stack

3 Tagged Fit Note

This has the bottom right corner folded up

4 Open Folder look

Dialog 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 Dialog is disabled and holds the system focus, the window itself will become the system focus.

parent: The only valid parent for a Dialog is the null component, also known as "app." 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.
visible: Setting a Dialog 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.

_aboutToClose()

_aboutToClose( self AS dialog )

This event is generated when the Dialog is about to close; i.e., when visible has changed from one to zero.

Pass:

self dialog
The Dialog experiencing the event.

_aboutToOpen()

_aboutToOpen( self AS dialog )

This event is generated when the Dialog is about to appear; i.e., when visible has changed from zero to one.

Pass:

self dialog
The Dialog experiencing the event.

_activeChanged()

_activeChanged( self As dialog, gained AS integer )

This event is generated when a different window becomes an active window--the non-modal, modal, or system modal dialog that is on top.

Passed:

self dialog
The component experiencing the event.

gained integer
If this argument is non-zero, then this dialog has just become an active window.
If this argument is zero, then the dialog is not an active window.

Dialog Actions

BringToFront()

BringToFront()

This action causes the Dialog, if it is visible, to come to the front of the screen, appearing above other dialogs of its priority.

Pass:

Nothing.