You can add text labels to slide or rotary objects for uses such as associating strings with integer values and selecting specific integer values.
Complete the following steps to create text labels on numeric objects with scales.
- Right-click the slide or rotary object and select Text Labels from the shortcut menu. The default text labels, min and max, appear on the scale. A text display also appears and displays the text labels.
- Use the Labeling tool to edit the labels.
- Right-click the text display and select Visible Items»Digital Display from the shortcut menu to display the numeric values associated with the text labels you create. These values always start at zero for the minimum value of the scale and increase by one for each text label.
- Complete the following steps to add more text labels and corresponding markers to the scale.
- Right-click the text display and select Edit Items from the shortcut menu to display the Edit Items page of the Slide Properties dialog box or the Knob Properties dialog box.
- Double-click in an empty cell in the Items column and enter the string you want to display next to the scale marker. You also can place the cursor in a cell that already contains a string, click the Insert button to create an empty row above the cell, and enter a string in the new cell.
- (Optional) If the marker spacing is arbitrary, you can assign a specific numeric value to each item by removing the checkmark from the Sequential values checkbox and entering the numeric value you want to use. By default, after you enter a string in the Items column, LabVIEW adds a numeric value for the marker to the corresponding cell in the Values column. LabVIEW assigns sequential values that correspond to the order of the items in the list, starting with a value of 0 for the first item.
- Click the OK button.
You can edit the text label for a marker by placing the cursor in the text display, editing the label, and pressing the <Ctrl-Enter> keys. (Mac OS X) Press the <Option-Enter> keys. (Linux) Press the <Alt-Enter> keys.
You also can use the Text Labels property to edit text labels programmatically.
You can right-click the text display and select Disable Item from the shortcut menu to disable a text label and marker so you cannot select the item at run time.