StringItem Class¶
-
class
NXOpen.UIStyler.
StringItem
¶ Bases:
NXOpen.UIStyler.StylerItem
Represents a StringItem for UI Styler.
New in version NX5.0.0.
Properties¶
Property | Description |
---|---|
ItemValue | Returns or sets the string value 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 | To get senstivity of string control @return TRUE if sensitive, FALSE if insensitive |
InitializeAttachment | Returns initialized dialog item attachment information @return attachment object |
IsEqualTo | Equates two styler items @return |
SetAttachment | Specifies the updated dialog item attachment information |
SetBitmap | Specifies a filename that contains a bitmap definition. |
SetFocus | Indicates that this dialog item is receiving keyboard focus |
SetLabel | Specifies descriptive text to display for the dialog item. |
SetSensitivity | Specifies the sensitivity of the dialog item. |
Property Detail¶
ItemValue¶
-
StringItem.
ItemValue
¶ Returns or sets the string value for this dialog item.
It can be the initial value that is programmatically defined, or interactively entered by the user.
-------------------------------------
Getter Method
Signature
ItemValue()
Returns: Get the String value Return type: str New in version NX5.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ItemValue(itemVal)
Parameters: itemVal (str) – String value New in version NX5.0.0.
License requirements: None.
Visibility¶
-
StringItem.
Visibility
¶ Returns or sets the visibility of the dialog item
-------------------------------------
Getter Method
Signature
Visibility()
Returns: TRUE if visible, FALSE if invisible Return type: bool New in version NX5.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Visibility(type)
Parameters: type (bool) – TRUE if visible, FALSE if invisible New in version NX5.0.0.
License requirements: None.
Method Detail¶
AddActivateHandler¶
-
StringItem.
AddActivateHandler
¶ Registers activate callback.
This method should be called before calling
UIStyler.Dialog.Show()
orUIStyler.Dialog.RegisterWithUiMenu()
Signature
AddActivateHandler(activateevent, isDialogLaunchingEvent)
Parameters: - activateevent (CallableObject) –
- isDialogLaunchingEvent (bool) –
New in version NX5.0.0.
License requirements: None.
GetSensitivity¶
-
StringItem.
GetSensitivity
¶ To get senstivity of string control
Signature
GetSensitivity()
Returns: TRUE if sensitive, FALSE if insensitive Return type: bool New in version NX5.0.0.
License requirements: None.
SetBitmap¶
-
StringItem.
SetBitmap
¶ Specifies a filename that contains a bitmap definition.
The filename must contain a UBM, XPM, or BMP extension. When you use this field, the system displays a bitmap for this dialog item instead of a text label. When a bitmap is present, the system uses the text label as tooltip text when a user places the mouse cursor over the bitmap. We recommend that you use a 16x16 bitmap for this dialog item.
Signature
SetBitmap(strBitmap)
Parameters: strBitmap (str) – Filename with .ubm, .xpm, or .bmp extension that contains bitmap definition New in version NX5.0.0.
License requirements: None.
SetFocus¶
-
StringItem.
SetFocus
¶ Indicates that this dialog item is receiving keyboard focus
Signature
SetFocus()
New in version NX5.0.0.
License requirements: None.
SetLabel¶
-
StringItem.
SetLabel
¶ Specifies descriptive text to display for the dialog item.
It should describe the dialog item’s intended use. If you specify a bitmap for this dialog item, it uses this text as tooltip text.
Signature
SetLabel(strLabel)
Parameters: strLabel (str) – String label to display on the left side of the text field New in version NX5.0.0.
License requirements: None.
SetSensitivity¶
-
StringItem.
SetSensitivity
¶ Specifies the sensitivity of the dialog item.
When you set sensitivity to False, it grays out the dialog item. This indicates that the dialog item exists but is not active.
Signature
SetSensitivity(type)
Parameters: type (bool) – TRUE if sensitive, FALSE if insensitive New in version NX5.0.0.
License requirements: None.