GetItemNum Method (LISTVIEW)
10.7, PLBCMP GUI Only
The GetItemNum method retrieves the data for a specified item in a LISTVIEW object and stores the data into numeric return variable. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A LISTVIEW object that is accessed.
return
Optional. A Numeric Variable that returns the numeric value for the item's text.
index
Required. A zero-based decimal number or Numeric Variable that specifies the item or row accessed.
subitem
Optional. A zero-based decimal number or Numeric Variable that specifies the sub-item number.
format
Optional. A decimal number or Numeric Variable that specifies the format of the data being stored in the {return} numeric variable.
Flags Affected: EOS, OVER, ZERO
Note the following:
{sub-item} specifies the text is to come from a child item (column) of {index}. If not given, zero is assumed and the text from the item label is returned.
Upon completion, {return} will contain the numeric value as specified for the item's text.
The (format) parameter is only used when the {return} variable is an INTEGER data type. The {format} value is not used when the {return} variable is a FORM. The {format} values are described as follows:
|
Value |
Description |
|
0 |
If the text data contains the leading '0x' characters, the text data value is scanned as a hexadecimal string. Otherwise, the text data valued is scanned as a decimal string. If the {format} is not used for the method, this is the default behavior. |
|
1 |
The text data value is always scanned as a hexadecimal string where the text data must have the leading '0x'. Otherwise, the return value is zero. |
If the {return} variable is a FORM variable and the text data contains the leading '0x' characters, the text data value is scanned as a hexadecimal string and converted to a decimal value. The converted decimal value is returned in the FORM variable.
The OVER, ZERO, and EOS Condition Flags are determined the same as described for a MOVE instruction of a Character String to a Numeric variable.
See Also: SetItemNum, LISTVIEW Methods
![]() |