GROUPBOXCREATE

Synopsis
GROUPBOXCREATE parent name xpos ypos width height
Description

Create a group box control. A group box control is a unique control compared with the other controls because all it does is group radio buttons (see RADIOBUTTONCREATE) and checkboxes (see CHECKBOXCREATE) both graphically and logically. Radio buttons and checkboxes must belong to a group box control.

The parent input is the name of the window that owns the new group box 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 group box control and must be a unique word.

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

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

The width input is the width of the new group box control.

The height input is the height of the new group box control.

If the parent of the group box 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
TO CHECKONTHINGS
  IFELSE CHECKBOXGET "myhideturtle [HIDETURTLE] [SHOWTURTLE]
END

WINDOWCREATE "main "mywindow "mytitle 0 0 100 100 []
GROUPBOXCREATE "mywindow "mygroupbox 10 10 80 40
CHECKBOXCREATE "mywindow "mygroupbox "myhideturtle [Hide Turtle] 20 20 60 20
BUTTONCREATE "mywindow "mybutton "Go 40 50 25 25 [CHECKONTHINGS]

Clicking on the Go button shows or hides the turtle,
depending on whether the checkbox is checked.

; Delete the window and all of its child controls.
WINDOWDELETE "mywindow

SourceForge.net Logo