WINDOWCREATE

Synopsis
WINDOWCREATE parent name title xpos ypos width height setup
Description

Creates a window. A 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 window. The window is modeless, which means that WINDOWCREATE stops before the window is destroyed. See Modal vs. Modeless for more details.

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

The name input identifies the new window (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 window.

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

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

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

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

The setup input is an instruction list to run when the window is created. The most common use of the setup input is create and add child controls to the window. You may give the empty list for this input and add controls later.

Example
WINDOWCREATE "main "mywindow "mytitle 0 0 100 100 []
BUTTONCREATE "mywindow "mybutton "PUSH 25 25 25 25 [PRINT "pushed]
WINDOWDELETE "mywindow

SourceForge.net Logo