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.

Note: 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
Create Creates a new 2D Graphics window, using the default map settings.
Remove Removes 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.

Note: 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.
Iconify This 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.
Raise This command restores the 2D Graphics window to the foreground and activates the map window.

Note: 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.

Note: 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.

Note: "<ToolbarName>" is case-sensitive.

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

Example

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

ReturnMessage

If activated, Connect returns an acknowledgement message.

Group Membership

This command belongs to the following group(s):

2D Graphics Window

Version

10

STK Programming Interface 11.0.1