Toggle Class¶
-
class
NXOpen.UIStyler.Toggle¶ Bases:
NXOpen.UIStyler.StylerItemRepresents a Toggle for UI Styler.
New in version NX5.0.0.
Properties¶
| Property | Description |
|---|---|
| ItemValue | Returns or sets an item value |
| Visibility | Returns or sets the visibility of the toggle |
Methods¶
| Method | Description |
|---|---|
| AddValueChangedHandler | Registers value change callback. |
| Dispose | Free resources associated with the instance. |
| GetItemType | Gets the dialog item type. |
| GetSensitivity | Gets the sensitivity |
| InitializeAttachment | Returns initialized dialog item attachment information |
| IsEqualTo | Equates two styler items |
| SetAttachment | Specifies the updated dialog item attachment information |
| SetDefaultAction | Indicates that this dialog item should override the accelerator on the second mouse button, which normally accelerates to the OK button. |
| SetFocus | Indicates that this dialog item is receiving keyboard focus. |
| SetLabel | Sets the label to display on the right side of the toggle button. |
| SetSensitivity | Sets the sensitivity of the toggle button |
Property Detail¶
ItemValue¶
-
Toggle.ItemValue¶ Returns or sets an item value
-------------------------------------Getter Method
Signature
ItemValueReturns: Return type: bool New in version NX5.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
ItemValueParameters: itemVal (bool) – New in version NX5.0.0.
License requirements: None.
Visibility¶
-
Toggle.Visibility¶ Returns or sets the visibility of the toggle
-------------------------------------Getter Method
Signature
VisibilityReturns: Return type: bool New in version NX5.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
VisibilityParameters: type (bool) – New in version NX5.0.0.
License requirements: None.
Method Detail¶
AddValueChangedHandler¶
-
Toggle.AddValueChangedHandler¶ Registers value change callback.
This method should be called before calling
UIStyler.Dialog.Show()orUIStyler.Dialog.RegisterWithUiMenu()Signature
AddValueChangedHandler(valuechangedevent, isDialogLaunchingEvent)Parameters: - valuechangedevent (CallableObject) – Value changed event
- isDialogLaunchingEvent (bool) – True if launch any dialog else False
New in version NX5.0.0.
License requirements: None.
GetSensitivity¶
-
Toggle.GetSensitivity¶ Gets the sensitivity
Signature
GetSensitivity()Returns: Return type: bool New in version NX5.0.0.
License requirements: None.
SetDefaultAction¶
-
Toggle.SetDefaultAction¶ 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 ON/OFF state and calls the Value Changed callback instead of the action of the OK button.
Signature
SetDefaultAction()New in version NX5.0.0.
License requirements: None.
SetFocus¶
-
Toggle.SetFocus¶ Indicates that this dialog item is receiving keyboard focus.
Signature
SetFocus()New in version NX5.0.0.
License requirements: None.