STATICCREATE

Synopsis
STATICCREATE parent name text xpos ypos width height
Description

Creates a static text control. A static control is used to simply display text. The term "static control" is somewhat misleading because the text displayed by a static control can be dynamically updated by STATICUPDATE.

The parent input is the name of the window that owns the new static control. If no window or dialog with that name exists, then the FMSLogo screen window is used as the parent.

The name input identifies the new static control and must be a unique word.

The text input is a word that is written on the static control. If there is more text than can fit within the width of the static control on a single line, then the text is word-wrapped.

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

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

The width input is the width of the new static control.

The height input is the height of the new static control.

If the parent of the static control is the FMSLogo screen window, then the xpos, ypos, width, and height inputs are all given in turtle coordinates. Otherwise, they are given in "dialog units", the origin is the upper-left corner of the parent, and Y values increase as you move down the screen.

Example

Creating a static control on a new window:

WINDOWCREATE "main "mywindow "mytitle 0 0 100 100 []
STATICCREATE "mywindow "mystatic [Heading=0] 25 25 50 25
REPEAT 72 [RIGHT 5 STATICUPDATE "mystatic SENTENCE [Heading=] HEADING WAIT 60]

Watch the text change as the turtle rotates.

WINDOWDELETE "mywindow

Creating a static control on the FMSLogo screen window:

STATICCREATE "main "mystatic [Heading=0] 25 25 100 50
REPEAT 72 [RIGHT 5 STATICUPDATE "mystatic SENTENCE [Heading=] HEADING WAIT 60]

Watch the text change as the turtle rotates.

WINDOWDELETE "main


SourceForge.net Logo