ToolPalette Class

class NXOpen.UIStyler.ToolPalette

Bases: NXOpen.UIStyler.StylerItem

Represents a ToolPalette for UI Styler

New in version NX5.0.0.

Properties

Property Description
ItemValue Returns or sets the currently selected choice for this dialog item.
Visibility Returns or sets the visibility of the dialog item

Methods

Method Description
AddActivateHandler Registers activate callback.
Dispose Free resources associated with the instance.
GetItemType Gets the dialog item type.
GetSensitivity Gets the sensitivity of the dialog item
InitializeAttachment Returns initialized dialog item attachment information
IsEqualTo Equates two styler items
SetAttachment Specifies the updated dialog item attachment information
SetDefault Indicates that this dialog item should override the accelerator on the second mouse button, which normally accelerates to the OK button.
SetLabel Specifies descriptive text to display for the dialog item.
SetSensitivity  

Property Detail

ItemValue

ToolPalette.ItemValue

Returns or sets the currently selected choice for this dialog item.

-------------------------------------

Getter Method

Signature ItemValue

Returns:Item value
Return type:int

New in version NX5.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ItemValue

Parameters:itemVal (int) – Item value

New in version NX5.0.0.

License requirements: None.

Visibility

ToolPalette.Visibility

Returns or sets the visibility of the dialog item

-------------------------------------

Getter Method

Signature Visibility

Returns:
Return type:bool

New in version NX5.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Visibility

Parameters:type (bool) –

New in version NX5.0.0.

License requirements: None.

Method Detail

AddActivateHandler

ToolPalette.AddActivateHandler

Registers activate callback.

This method should be called before calling UIStyler.Dialog.Show() or UIStyler.Dialog.RegisterWithUiMenu()

Signature AddActivateHandler(activateevent, isDialogLaunchingEvent)

Parameters:
  • activateevent (CallableObject) –
  • isDialogLaunchingEvent (bool) –

New in version NX5.0.0.

License requirements: None.

GetSensitivity

ToolPalette.GetSensitivity

Gets the sensitivity of the dialog item

Signature GetSensitivity()

Returns:True if sensitivity is set otherwise False
Return type:bool

New in version NX5.0.0.

License requirements: None.

SetDefault

ToolPalette.SetDefault

Indicates that this dialog item should override the accelerator on the second mouse button, which normally accelerates to the OK button.

When you set this attribute, a click on the second mouse button triggers this dialog item’s Activate callback instead of the action of the OK button.

Signature SetDefault(dialogId)

Parameters:dialogId (int) –

New in version NX5.0.0.

License requirements: None.

SetLabel

ToolPalette.SetLabel

Specifies descriptive text to display for the dialog item.

It should describe the dialog item’s intended use.

Signature SetLabel(strLabel)

Parameters:strLabel (str) – String label

New in version NX5.0.0.

License requirements: None.

SetSensitivity

ToolPalette.SetSensitivity

Signature SetSensitivity(subitemIndex, type)

Parameters:
  • subitemIndex (int) – Sub item index
  • type (bool) – True if sentivity is set otherwise False

New in version NX5.0.0.

License requirements: None.