Description | Example | Return message | Group

Window2D

Create, remove or modify a 2D Graphics window

Syntax

Window2D <ScenarioPath> {2DGfxWinOption} <Value> [WindowID <WinNumber>]

Related commands

Description

The Window2D command will create a new 2D Graphics window, using the default 2D Graphics window properties, remove an existing 2D Graphics window, or modify the appearance of a 2D Graphics window.

This command is not available for STK X.

Include the WindowID <WinNumber> parameter to specify a 2D Graphics window. If WindowID <WinNumber> is not included then the first 2D Graphics window will be used.

{2DGfxWinOption} <Value>Description
CreateCreates a new 2D Graphics window, using the default map settings.
RemoveRemoves a 2D Graphics window. If <WinNumber> is not specified, then the first 2D Graphics window will be removed.
Place <X> <Y>Indicates X,Y position of 2D Graphics window on the screen, where 0,0 is in the upper left corner of the screen. This command will move the 2D Graphics window to the new location and activate the map window.

If your monitor configuration includes multiple monitors, use negative values in the Place command to move the window to the left or upper monitor(s).

Size <Width> <Height> <Width> and <Height> indicates the new size of the 2D Graphics window. This command will resize the 2D Graphics window and activate the map window.
InnerSize <Width> <Height> <Width> and <Height> indicates the new size of the 2D Graphics window, discounting the borders and frame. This command will resize the 2D Graphics window and activate the map window.
IconifyThis option is only applicable to integrated windows and the window will be iconified in the workarea. If the window is floating or docked then the command is ignored.
RaiseThis command restores the 2D Graphics window to the foreground and activates the map window.

If another program has the focus it may not allow the application to be shown, but the taskbar buttons will flash. This is a function of Windows2000 and above.

SetFrame {Normal | Minimal | None}
  • Normal. 2D Graphics window displays with a title bar and border.
  • Minimal. 2D Graphics window hides the title bar and changes the border to a re-sizing border.
  • None. 2D Graphics window hides the title bar and border for seamless graphics integration into other applications.

If the application is full-screen, just the title bar will be shown or hidden.

SetTitle "<New Title>"Change the title of a 2D Graphics window to "<New Title>", and activate the map window.
Toolbar {Hide | Show} "<ToolbarName>"Hide or show the specified toolbar in the map window.

"<ToolbarName>" is case-sensitive.

Dock {Top | Bottom | Left | Right}Dock the window to the main application.
IntegrateIntegrate the window into the main application.
FloatFloat the window.
InpDevMode EnablePanMode {On | Off} Control panning for the 2D Graphics window

Examples

To create a new 2D Graphics window using the default properties:

Window2D * Create

To remove 2D Graphics window #1:

Window2D * Remove WindowID 1

To place 2D Graphics window #2 at x: 200, y: 200:

Window2D * Place 200 200 WindowID 2

To change the frame of the 2D Graphics window:

Window2D * SetFrame Minimal

To show the Animation toolbar in 2D Graphics window #2:

Window2D * Toolbar Show "Animation" WindowID 2

To enable panning for 2D Graphics window #2:

Window2D * InpDevMode EnablePanMode On WindowID 2

Return message

Group membership

This command belongs to the following group(s):

2D Graphics Window

Version

10