List Box Buttons
220
TPDesign4 (v3.2 or higher)
Working With Dynamic List Box Data
List Box Commands
There are two types of List Box Commands that can be used to define List Box Data in your NetLinx Code:
Data List Commands
Command Structure List View Commands
Data List Commands
Data List Commands
^LDN Creates a new data list. Unique list addresses and names are handled programmatically.
Syntax:
"'^LDN-<list port>,<list address>,<column count>,<list name>'"
Variables:
• list port = port where data resides
• list address = address where data resides
• column count = the number of data columns (includes hidden columns)
• list name = User specified name for the data list
Example:
SEND_COMMAND Keypad, "'^LDN-5,1,4,my songs'"
Creates a data list of 4 columns named "my songs" and places it at port 5, address 1.
^LDA Adds a new row to an existing data list. Primary data is required.
List box commands contain comma-delimited fields, but you can use commas within the fields. Use
double-quotes to surround fields in which commas are needed.
Syntax:
"'^LDA-<list address>,<uniflag>,<primary data>,<data2>,...'"
Variables:
• list address = address where data resides
• uniflag = indicates UniCode; 0 - No UniCode, 1 - Uses UniCode
• primary data = the "key" data column. The information in this column provides each row with its
uniqueness.
• data2 = variable, column data information. The number of data fields is limited only to the number of
columns in the data list.
Example:
SEND_COMMAND Keypad, "'^LDA-1,0,Entry5,Meatloaf,Best of,Anything for Love'"
Adds a text row to the data list located at address 1. The primary data is set as Entry5. Meatloaf, Best
of, and Anything for Love are all cells within the new row.
Note the following rules apply:
• Leading and trailing spaces are ignored before and after opening and closing double quotes.
• Double quotes must be the first non-space character after the previous delimiter (,) and the last non-
space character before the following delimiter (or end of command).
• Within double quotes, the backslash (\) is used as an escape character. This is to allow double quote
literals within the string bounded by double quotes. When a backslash is parsed, the next character
is read as a literal value and the backslash is discarded. There are 2 cases in which you would use
the backslash to escape a double quote literal within the field, to escape another backslash (commas
do not need to be escaped).
• Any data field that has a double quote literal as its first character MUST use double quotes to delimit
the field, then use the backslash to escape the double quote literal.
Comments to this Manuals