Class CommandBarPopup
Corresponds to a menu popup (or a toolstrip inside a menu)
Implements
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Environment
Assembly: ABB.Robotics.RobotStudio.Environment.dll
Syntax
public class CommandBarPopup : CommandBarControl, ICommandBarControlContainer
Constructors
CommandBarPopup(String)
Creates a CommandBarPopup with a specific ID.
Declaration
public CommandBarPopup(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | Control ID |
Remarks
The ID will be set as the popup's caption as well.
Prefix the ID with the name of your Add-In, to avoid conflicts.
See Also
CommandBarPopup(String, String)
Creates a CommandBarPopup with a specific ID and caption.
Declaration
public CommandBarPopup(string id, string caption)
Parameters
Type | Name | Description |
---|---|---|
String | id | Control ID |
String | caption | Control caption |
Remarks
The ID can be null, which creates a popup that will not be added
to the UIEnvironment.CommandBarControls collection.
If you specify an ID, prefix it with the name of your Add-In, to avoid conflicts.
See Also
CommandBarPopup(String, String, CommandBarControl[])
Creates a CommandBarPopup with a specific ID, caption and child controls
Declaration
public CommandBarPopup(string id, string caption, params CommandBarControl[] controls)
Parameters
Type | Name | Description |
---|---|---|
String | id | Control ID |
String | caption | Control caption |
CommandBarControl[] | controls | Child controls |
Remarks
The ID can be null, which creates a popup that will not be added
to the UIEnvironment.CommandBarControls collection.
If you specify an ID, prefix it with the name of your Add-In, to avoid conflicts.
See Also
Properties
ClickButton
The button whose command will be executed when the button part of the popup is clicked.
Declaration
public CommandBarButton ClickButton { get; set; }
Property Value
Type | Description |
---|---|
CommandBarButton |
Remarks
Currently not supported for CommandBarButtons that are part of menus.
Controls
Gets a collection of all child CommandBarControls contained by this popup
Declaration
public CommandBarControlCollection Controls { get; }
Property Value
Type | Description |
---|---|
CommandBarControlCollection |
Enabled
Gets or sets if the popup should be enabled or not, or if that status should be controlled by its children.
Declaration
public CommandBarPopupEnableMode Enabled { get; set; }
Property Value
Type | Description |
---|---|
CommandBarPopupEnableMode |
HasEnabledItems
Returns True if the popup has at least one enabled item.
Declaration
public virtual bool HasEnabledItems { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsEnabled
Gets if the popup should be enabled according to to Enabled and HasEnabledItems properties.
Declaration
public bool IsEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
ShowDisabledItems
If True, disabled items are shown grayed out, otherwise they are not shown at all. Default is True.
Declaration
public bool ShowDisabledItems { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ShowFilter
Display a text box for filtering long lists of popup items.
Declaration
public bool ShowFilter { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Currently not supported for gallery popups.
Methods
FromID(String)
Returns the CommandBarPopup that has the specified ID, or null if none exists.
Declaration
public static CommandBarPopup FromID(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | ID to find popup for |
Returns
Type | Description |
---|---|
CommandBarPopup | The CommandBarPopup with the specified ID |
Remarks
This is the same as UIEnvironment.CommandBarControls[id] as CommandBarPopup
Show(Int32, Int32)
Displays the popup at the given position in screen coordinates
Declaration
public void Show(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | |
Int32 | y |
Events
UpdateContent
Occurs before the popup's list of menu items is displayed or when the framework needs to determine if the popup should be grayed out or not
Declaration
public event EventHandler UpdateContent
Event Type
Type | Description |
---|---|
EventHandler |
Remarks
Allows you to modify the menu popup's content before it is displayed, as a more powerful alternative to using a CommandBarButtonGroup.