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.

can_pin

Return whether the window supports pinning.

caption

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

dock_style

The window docking style.

height

The window height.

left

The window horizontal position.

no_workbook_close

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

toolbars

Return the windowโ€™s toolbar collection.

top

The window vertical position.

unpinned

The windowโ€™s pinned state.

width

The window width.

window_state

The window state.

Import detail#

from ansys.stk.core.uicore import Window

Property detail#

property Window.can_pin: bool#

Return whether the window supports pinning.

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.dock_style: WindowDockStyle#

The window docking style.

property Window.height: int#

The window height.

property Window.left: int#

The window horizontal position.

property Window.no_workbook_close: bool#

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

property Window.toolbars: ToolbarCollection#

Return the windowโ€™s toolbar collection.

property Window.top: int#

The window vertical position.

property Window.unpinned: bool#

The windowโ€™s pinned state.

property Window.width: int#

The window width.

property Window.window_state: ApplicationWindowState#

The window state.

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