NXKnowledge

Block UI Styler > Block Catalog > Basic

List Box

The List Box block provides a control to input a selection of zero, one, or more items to the command. It can optionally display Content Control buttons next to the list: Add, Remove (Delete), Up, and Down.

See also: Registering Add and Delete callbacks for List Box (source xid292839) for wiring up the Add/Delete buttons.

Inherited general properties

  • BlockID
  • Enable
  • Group
  • Label
  • Show
  • Expanded

Block-specific properties

Property Name Description Access Property Type List of Values
Height Specifies the number of rows shown on the dialog. CIG Integer Any value; values <= 0 mean use the default height.
ListItems Contains the list of items for the list box. CSG Strings Any string values.
MaximumHeight Specifies the maximum number of rows shown when the dialog is resized. Valid only if ResizeHeightWithDialog is true. CIG Integer Any value; values <= 0 mean no maximum.
MaximumStringLength Specifies the maximum number of characters per row/item. CIG Integer Any value; values <= 0 mean no maximum.
MinimumHeight Specifies the minimum number of rows shown when the dialog is resized. Valid only if ResizeHeightWithDialog is true. Note: if MinimumHeight > MaximumHeight, MinimumHeight assumes the value of MaximumHeight. CIG Integer Any value; values <= 0 mean no minimum.
ResizeHeightWithDialog Specifies whether the height dynamically changes when the dialog is resized. CIG Logical TRUE — height changes. FALSE — height stays fixed.
ShowAddButton Specifies whether to show the "Add Item" button. The button is functional only when a callback is registered for it. CIG Logical TRUE / FALSE.
IsAddButtonSensitive Specifies the sensitivity (enabled state) of the Add button. SG Logical TRUE — Add button is sensitive. FALSE — not sensitive.
ShowDeleteButton Specifies whether to show the "Delete Item" button. CIG Logical TRUE — visible. FALSE — not visible.
IsDeleteButtonSensitive Specifies the sensitivity of the Delete button. The button is not enabled if no item is selected. SG Logical TRUE — sensitive. FALSE — not sensitive.
ShowMoveUpDownButtons Specifies whether to show the buttons for moving an item up or down. CIG Logical TRUE — visible. FALSE — not visible.
SingleSelect Specifies whether only a single item is selectable. CIG Logical TRUE — only one item selectable. FALSE — multiple items selectable.
Localize Allows localization of the block Label if it matches an English string in the NX localization database. CIG Logical TRUE / FALSE.
AllowDeselectForSingleSelect Specifies whether to allow deselecting an item using Ctrl+MB1. Relevant only when SingleSelect is true. CIG Logical TRUE — allows deselection. FALSE — disallows.
SelectedItemIndex Returns the index of the selected item. Valid only for a SingleSelect List Box. SG Integer Index of selected item if SingleSelect is TRUE; returns -1 if SingleSelect is FALSE.
SelectedItemString Returns the string of the selected item. Valid only for a SingleSelect List Box. SG String Any string; returns empty string if SingleSelect is FALSE.
SelectedItemStrings Returns the array of selected items. SG Strings Array of strings. Returns an array with only one string if SingleSelect is TRUE.
SelectedItemBooleans Returns an array with values containing either 0 or 1 for the selected item(s). SG IntegerVector Integer array of 0s/1s. Returns an array with only one value for a SingleSelect List Box.

Access column legend

Character Stands for Meaning
C Creation Modifiable interactively in Block UI Styler at design time.
I Initialize Modifiable at run time via NXOpen API, but only during the Initialize callback.
G Get Readable via NXOpen API in any callback.
S Set Modifiable at run time via NXOpen API in any callback.

Related Basic blocks

Action Button, Drawing Area, Enumeration, Label/Bitmap, Multi-Line String, Object Color Picker, RGB Color Picker, Separator, String, Toggle.

Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.blockstyler/bs_list_box · retrieved 2026-07-07