SingleSelectList Class — NXOpen Python API Reference 12.0.0 documentation

# SingleSelectList Class

class `NXOpen.UIStyler.``SingleSelectList`

  Bases: `NXOpen.UIStyler.StylerItem`

  Represents a SingleSelectList for UI Styler

  New in version NX5.0.0.

# Properties

Property | Description
--- | ---
Sensitivity | Returns or sets the sensitivity of the single select list
Visibility | Returns or sets the visibility of the single select list

# Methods

Method | Description
--- | ---
AddActivateHandler | Registers activate callback.
AddDoubleClickHandler | Registers double click callback.
Append | Appends one or more entries to be inserted into the list
DeleteSubItem | Requests a list entry to be deleted.
DeselectSubItem | Requests a list entry to be deselected.
Dispose | Free resources associated with the instance.
GetItemType | Gets the dialog item type.
GetListItems | Gets an array of character strings that are used as entries in the list.
GetSelectedIndexValue | Gets selected index
GetSelectedString | Gets selected string
HasSelected | Returns whether or not an item has been selected
InitializeAttachment | Returns initialized dialog item attachment information
InsertSubItem | Requests one or more entries to be inserted into the list.
IsEqualTo | Equates two styler items
SetAttachment | Specifies the updated dialog item attachment information
SetFocus | Indicates that this dialog item is receiving keyboard focus.
SetListItems | Specifies an array of character strings that are used as entries in the list
SetSelected | Specifies particular list items to be selected
ShowSubItem | Requests that a list entry be scrolled up to the first line in the list

# Property Detail

## Sensitivity

`SingleSelectList.``Sensitivity`

  Returns or sets the sensitivity of the single select list

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

  Getter Method

  Signature `Sensitivity`

  Returns: |
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Sensitivity`

  Parameters: | type (bool) –

  New in version NX5.0.0.

  License requirements: None.

## Visibility

`SingleSelectList.``Visibility`

  Returns or sets the visibility of the single select list

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

  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

`SingleSelectList.``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.

## AddDoubleClickHandler

`SingleSelectList.``AddDoubleClickHandler`

  Registers double click callback.

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

  Signature `AddDoubleClickHandler(doubleclickevent, isDialogLaunchingEvent)`

  Parameters:

  - doubleclickevent (CallableObject) –
  - isDialogLaunchingEvent (bool) –

  New in version NX5.0.0.

  License requirements: None.

## Append

`SingleSelectList.``Append`

  Appends one or more entries to be inserted into the list

  Signature `Append(multiEntries)`

  Parameters: | multiEntries (list of str) – An array of entry names to be inserted into the list. This field is used only when more than one entry are to be inserted into the list.

  New in version NX5.0.0.

  License requirements: None.

## DeleteSubItem

`SingleSelectList.``DeleteSubItem`

  Requests a list entry to be deleted.

  Signature `DeleteSubItem(subItemIndex)`

  Parameters: | subItemIndex (int) – Zero-based index of a list entry to be deleted. If subitem_index equals UF_STYLER_NO_SUB_INDEX, then all list entries are deleted.

  New in version NX5.0.0.

  License requirements: None.

## DeselectSubItem

`SingleSelectList.``DeselectSubItem`

  Requests a list entry to be deselected.

  Signature `DeselectSubItem(subItemIndex)`

  Parameters: | subItemIndex (int) –

  New in version NX5.0.0.

  License requirements: None.

## GetListItems

`SingleSelectList.``GetListItems`

  Gets an array of character strings that are used as entries in the list.

  Signature `GetListItems()`

  Returns: | An array of string items
  Return type: | list of str

  New in version NX5.0.0.

  License requirements: None.

## GetSelectedIndexValue

`SingleSelectList.``GetSelectedIndexValue`

  Gets selected index

  Signature `GetSelectedIndexValue()`

  Returns: |
  Return type: | int

  New in version NX5.0.0.

  License requirements: None.

## GetSelectedString

`SingleSelectList.``GetSelectedString`

  Gets selected string

  Signature `GetSelectedString()`

  Returns: |
  Return type: | str

  New in version NX5.0.0.

  License requirements: None.

## HasSelected

`SingleSelectList.``HasSelected`

  Returns whether or not an item has been selected

  Signature `HasSelected()`

  Returns: |
  Return type: | bool

  New in version NX7.5.1.

  License requirements: None.

## InsertSubItem

`SingleSelectList.``InsertSubItem`

  Requests one or more entries to be inserted into the list.

  You can insert entries at the bottom of the list or at any position within the list.

  Signature `InsertSubItem(subitemIndex, multiEntries)`

  Parameters:

  - subitemIndex (int) – Position index where the insertion should be made. If subitem_index equals UF_STYLER_NO_SUB_INDEX, then the new list entries are added to the bottom of the list.
  - multiEntries (list of str) – An array of entry names to be inserted into the list. This field is used only when more than one entry are to be inserted into the list.

  New in version NX5.0.0.

  License requirements: None.

## SetFocus

`SingleSelectList.``SetFocus`

  Indicates that this dialog item is receiving keyboard focus.

  Signature `SetFocus()`

  New in version NX5.0.0.

  License requirements: None.

## SetListItems

`SingleSelectList.``SetListItems`

  Specifies an array of character strings that are used as entries in the list

  Signature `SetListItems(itemVal)`

  Parameters: | itemVal (list of str) – An array of string items

  New in version NX5.0.0.

  License requirements: None.

## SetSelected

`SingleSelectList.``SetSelected`

  Specifies particular list items to be selected

  Signature `SetSelected(subIndex)`

  Parameters: | subIndex (int) – Inndex of particular list items to be selected

  New in version NX5.0.0.

  License requirements: None.

## ShowSubItem

`SingleSelectList.``ShowSubItem`

  Requests that a list entry be scrolled up to the first line in the list

  Signature `ShowSubItem(subItemIndex)`

  Parameters: | subItemIndex (int) – Zero-based index of a list entry to be scrolled up to the first line of the list.

  New in version NX5.0.0.

  License requirements: None.