GUI - Container settings
These define the characteristics of the window that will contain your GUI elements.
Sets the size of the window in pixels.
If you don't set a size, Red does it automatically.
As an interesting note, unless the window is big enough to show part of the title, you can't move (drag) it.
Sets the title at top of the window.
Sets the background color of the window
- See the specific chapter.
setting an icon
This only works if you compile the code! Does NOT work on interpreted code.
Not a container setting, but I think it fits here. If you want to set an icon to your window that is not the Red default, add
icon: <path-to-icon> after the
needs: 'view in the Red initial block:
Containers (windows) allow the refinements options, flags and no-wait. The refinements options and flags are defined in blocks after the
view main block.
In the options refinement you can determine your window's offset and size (size seems to be definable in both ways, as a container setting or an option).
Offset determines where your window will show, measured from the top left of your screen.
modal - modal window, demands attention, disables all other windows until you close it.
Note: if you create a window that is modal and no-title/no-border, it is pretty hard to get rid of it, I had to use Task Manager.
resize - the window can be resized.
no-title - results in a square frame with no title or buttons.
no-border - results in a square frame with no title or buttons and no border.
no-min - only the close button is shown on window's top.
no-max - the maximize button is shown as inactive.
no-buttons - no window's buttons (maximize, minimize, close) are shown.
popup - Windows only - makes the window a popup. It has a special styling (close button only) and allows other windows to stay active. Closes if you change focus to other windows.
From the documentation: "View: Render on screen a window from a face tree or a block of VID code. Enters an event loop unless /no-wait refinement is used.