Class Window
Corresponds to a window hosted in the application.
Namespace: ABB.Robotics.RobotStudio.Environment
Assembly: ABB.Robotics.RobotStudio.Environment.dll
Syntax
public abstract class Window : IDisposable
Remarks
This class cannot be instantiated directly. Use one of the derived classes instead (ToolWindow or DocumentWindow).
Properties
ActiveTab
Gets or sets if this is the active window in a tabbed group
Declaration
public bool ActiveTab { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Returns false if this is not part of a tabbed group. Setting this property to false is not allowed.
ActiveWindow
Gets or sets the window that has focus
Declaration
public static Window ActiveWindow { get; set; }
Property Value
Type | Description |
---|---|
Window |
AlternateTabColor
ABB Internal use only
Declaration
public bool AlternateTabColor { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Caption
Gets or sets the window's caption
Declaration
public string Caption { get; set; }
Property Value
Type | Description |
---|---|
String |
Control
Gets or sets the window's contained control
Declaration
public Control Control { get; set; }
Property Value
Type | Description |
---|---|
Control |
DefaultTabVisibility
Gets or sets the visibility of this window for those ribbon tabs where SetTabVisibility() has not been called.
Declaration
public bool DefaultTabVisibility { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
HelpId
Gets the help ID of the window, used for context sensitive help.
Declaration
public virtual string HelpId { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
By default, this will be the same as the window ID
Icon
This property is obsolete and may be removed in a future version.
Declaration
olete("No longer used")]
public Icon Icon { get; set; }
Property Value
Type | Description |
---|---|
Icon |
Id
Gets the window's ID
Declaration
public object Id { get; }
Property Value
Type | Description |
---|---|
Object |
IsVisible
Gets if this window is currently visible.
Declaration
public bool IsVisible { get; }
Property Value
Type | Description |
---|---|
Boolean |
Menu
Returns the menu for this window
Declaration
public CommandBarPopup Menu { get; }
Property Value
Type | Description |
---|---|
CommandBarPopup |
Tag
Gets or sets an object that contains data about the window
Declaration
public object Tag { get; set; }
Property Value
Type | Description |
---|---|
Object |
ToolTip
Gets or sets the window's tooltip
Declaration
public string ToolTip { get; set; }
Property Value
Type | Description |
---|---|
String |
Visible
Gets or sets if the window is visible or not
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
VisibleLocked
Gets or sets if the user is allowed to modify the visibility state of this Window
Declaration
public bool VisibleLocked { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
This only affects the user interface; it is always possible to change visibility using the API.
Methods
Close()
Closes the window, i.e. removes it from the environment and disposes it.
Declaration
public bool Close()
Returns
Type | Description |
---|---|
Boolean | True if window was actually closed, false otherwise |
Dispose()
Disposes any owned resources of the window. E. g. its control.
Declaration
public void Dispose()
Dispose(Boolean)
Called by Dispose. Override to add disposing behavior to your subclass.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing |
GetTabVisibility(RibbonTab)
Returns the visibility of this window when the specified tab is active
Declaration
public bool GetTabVisibility(RibbonTab tab)
Parameters
Type | Name | Description |
---|---|---|
RibbonTab | tab |
Returns
Type | Description |
---|---|
Boolean |
SetTabVisibility(RibbonTab, Boolean)
Sets the visibility of this window when the specified tab is active
Declaration
public void SetTabVisibility(RibbonTab tab, bool visible)
Parameters
Type | Name | Description |
---|---|---|
RibbonTab | tab | |
Boolean | visible |
SetTabVisibility(String, Boolean)
Sets the visibility of this window when the specified tab is active
Declaration
public void SetTabVisibility(string tabId, bool visible)
Parameters
Type | Name | Description |
---|---|---|
String | tabId | |
Boolean | visible |
Events
ActiveWindowChanged
Raised when the active window has changed
Declaration
public static event EventHandler ActiveWindowChanged
Event Type
Type | Description |
---|---|
EventHandler |
Closed
Raised after the window has been closed
Declaration
public event EventHandler Closed
Event Type
Type | Description |
---|---|
EventHandler |
Closing
Raised before the window is closed
Declaration
public event CancelEventHandler Closing
Event Type
Type | Description |
---|---|
CancelEventHandler |
ControlChanged
Occurs when the Control property value changes
Declaration
public event EventHandler ControlChanged
Event Type
Type | Description |
---|---|
EventHandler |
VisibleChanged
Occurs when the Visible property value changes.
Declaration
public event EventHandler VisibleChanged
Event Type
Type | Description |
---|---|
EventHandler |