Syntax
| window.ID.create(show, groupName, movable, stayOnTop, escapeClose, rightClickClose, canGoOut) |
Parameters
| BOOL | show | Optional. Default is true. Set to true if the window should be shown immediately.
| | STRING | groupName | Optional. Default is null. Name of the group. When a group name is set, the events raised for this window have their name concatenated with the name of the group. For example, if the group of a window is set to TOOLS, the event window:move becomes window:move:TOOLS.
| | KEYWORD | movable | Optional. Default is true. true: The user can move the window by dragging it with the mouse. false: The window cannot be moved. XONLY: The user can move the window horizontally - vertical position is fixed. YONLY: The user can move the window vertically - horizontal position is fixed.
Info: The window cannot be moved if the mouse is over the web browser object even if this parameter is set to true.
| | BOOL | stayOnTop | Optional. Default is true. If set to true, the window stays on top of the other windows, except for those who have the same attribute. In that case, the window who have the focus is in front of the others.
| | BOOL | escapeClose | Optional. Default is true. If set to true, the window can be closed with the ESC key when the window has the focus.
| | BOOL | rightClickClose | Optional. Default is true. If set to true, the user can close the window with a right click.
| | BOOL | canGoOut | Optional. Default is false. If this parameter is set to true, the window can be moved outside of the area of the window (the area of the new window outside of the parent window is not visible). |
Return value
| Window ID or null if failure. |
Description
This function creates a new window in the window specified by ID.
To create a floating window: window.create.
The function returns a window ID that can be used with various functions: draw..., window... or mouse....
It is possible to create 255 windows. |
MioScript Sample Code
// Shows the main window in red, and a second window in blue.
event.load
window.main.pos.now(100,100,200,200)
draw.main.rect(0,0,200,200,num.rgb(255,0,0))
draw.main.paint()
&WID= window.main.create()
window.&WID.pos.now(20,20,160,160)
draw.&WID.rect(0,0,200,200,num.rgb(0,0,255))
event.end |
|