Window#

class ansys.stk.core.uicore.Window#

Represents a window abstraction. Provides methods and properties to manipulate the position and the state of the window.

Overview#

activate

Activates the window.

close

Close the window.

get_service_by_name

Return a service object that can be accessed at runtime. The method returns null if no service object is associated with the specified symbolic name.

get_service_by_type

Return a service object that can be accessed at runtime. The method returns null if no service object is associated with the specified service type.

caption

Get or set the window caption. Can only be set within UI plugins for the non unique windows they own.

window_state

The window state.

height

The window height.

width

The window width.

left

The window horizontal position.

top

The window vertical position.

dock_style

The window docking style.

no_workbook_close

Whether to close the window when the application workbook is loaded/closed.

unpinned

The windowโ€™s pinned state.

can_pin

Return whether the window supports pinning.

toolbars

Return the windowโ€™s toolbar collection.

Import detail#

from ansys.stk.core.uicore import Window

Property detail#

property Window.caption: str#

Get or set the window caption. Can only be set within UI plugins for the non unique windows they own.

property Window.window_state: ApplicationWindowState#

The window state.

property Window.height: int#

The window height.

property Window.width: int#

The window width.

property Window.left: int#

The window horizontal position.

property Window.top: int#

The window vertical position.

property Window.dock_style: WindowDockStyle#

The window docking style.

property Window.no_workbook_close: bool#

Whether to close the window when the application workbook is loaded/closed.

property Window.unpinned: bool#

The windowโ€™s pinned state.

property Window.can_pin: bool#

Return whether the window supports pinning.

property Window.toolbars: ToolbarCollection#

Return the windowโ€™s toolbar collection.

Method detail#

Window.activate(self) None#

Activates the window.

Returns:

None

Window.close(self) None#

Close the window.

Returns:

None

Window.get_service_by_name(self, name: str) Any#

Return a service object that can be accessed at runtime. The method returns null if no service object is associated with the specified symbolic name.

Parameters:

name : str

Returns:

Any

Window.get_service_by_type(self, service_type: WindowServiceType) Any#

Return a service object that can be accessed at runtime. The method returns null if no service object is associated with the specified service type.

Parameters:

service_type : WindowServiceType

Returns:

Any