DIALOGCREATE

Synopsis
DIALOGCREATE parent name title xpos ypos width height setup
Description

Creates a window that is suitable for use as a dialog box. A dialog window is used as the framework to which you add other window objects or controls (sometimes called widgets). You can add things such as buttons, scrollbars, listboxes, etc. to the dialog. This command is similar to WINDOWCREATE except that it does not stop until the dialog is closed (see Modal vs. Modeless).

The parent input is the name of the window that owns the new dialog. If this is the first window you are creating, use "main as the parent input.

The name input identifies the new dialog (perhaps as the parent of another future window or control) and must be a unique word.

The title input specifies the title, or caption, of the new dialog.

The xpos input is the X coordinate where the upper-left corner of the new dialog is placed.

The ypos input is the Y coordinate where the upper-left corner of the new dialog is placed.

The width input is the width of the new dialog, in dialog units.

The height input is the height of the new dialog, in dialog units.

The setup input is an instruction list to run when the dialog is created. You should create and add child controls in the setup instruction list because DIALOGCREATE does not stop until the dialog is closed. Be sure to add at least one button that calls DIALOGDELETE on this window, such as OK, End, Close, or Cancel.

Example
TO MYSETUP
  BUTTONCREATE "mydialog "myok "OK 25 25 50 25 [DIALOGDELETE "mydialog]
END

DIALOGCREATE "main "mydialog "mytitle 0 0 100 75 [MYSETUP]

SourceForge.net Logo