ContextMenuEntry Class — NXOpen Python API Reference 12.0.0 documentation

# ContextMenuEntry Class

class `NXOpen.MenuBar.``ContextMenuEntry`

  Bases: `NXOpen.TransientObject`

  Represents an entry on a context menu.

  New in version NX8.5.0.

# Properties

Property | Description
--- | ---
EntryType | Returns the type of this menu entry.
IsDefault | Returns true if this entry is the default action for the menu.
IsHidden | Returns true if this entry is hidden on the menu.
IsSensitive | Returns true if the command corresponding to this entry can be run.
Label | Returns the label of this menu entry.
Name | Returns the name of this menu entry.

# Methods

Method | Description
--- | ---
Dispose | Frees the object from memory.

# Enumerations

ContextMenuEntryType Enumeration | Specifies the type of the menu entry.

# Property Detail

## EntryType

`ContextMenuEntry.``EntryType`

  Returns the type of this menu entry.

  `-------------------------------------`

  Getter Method

  Signature `EntryType`

  Returns: |
  Return type: | `NXOpen.MenuBar.ContextMenuEntryType`

  New in version NX8.5.0.

  License requirements: None.

## IsDefault

`ContextMenuEntry.``IsDefault`

  Returns true if this entry is the default action for the menu.

  A menu entry is marked as the default for the menu when it corresponds to the double-click action.

  `-------------------------------------`

  Getter Method

  Signature `IsDefault`

  Returns: |
  Return type: | bool

  New in version NX8.5.0.

  License requirements: None.

## IsHidden

`ContextMenuEntry.``IsHidden`

  Returns true if this entry is hidden on the menu.

  `-------------------------------------`

  Getter Method

  Signature `IsHidden`

  Returns: |
  Return type: | bool

  New in version NX8.5.0.

  License requirements: None.

## IsSensitive

`ContextMenuEntry.``IsSensitive`

  Returns true if the command corresponding to this entry can be run.

  `-------------------------------------`

  Getter Method

  Signature `IsSensitive`

  Returns: |
  Return type: | bool

  New in version NX8.5.0.

  License requirements: None.

## Label

`ContextMenuEntry.``Label`

  Returns the label of this menu entry.

  `-------------------------------------`

  Getter Method

  Signature `Label`

  Returns: |
  Return type: | str

  New in version NX8.5.0.

  License requirements: None.

## Name

`ContextMenuEntry.``Name`

  Returns the name of this menu entry.

  Some entries on the context menu may correspond to buttons on the menu bar. For these entries, the name that is returned is the name of that `MenuBar.MenuButton` object.

  For all other entries which do not correspond to a menu bar button, the name that is returned has no specific meaning. However, for any individual action within any specific context menu, the name that is assigned to that action will not change.

  `-------------------------------------`

  Getter Method

  Signature `Name`

  Returns: |
  Return type: | str

  New in version NX8.5.0.

  License requirements: None.

# Method Detail

## Dispose

`ContextMenuEntry.``Dispose`

  Frees the object from memory.

  After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.

  Signature `Dispose()`

  New in version NX8.5.0.

  License requirements: None.