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:

 

[label]

{object}.GetItemNum

[GIVING {return}] USING [*Index=]{index}[:

 

 

[*Subitem=]{subitem}]

 

 

[*Format=]{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:

  1. {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.

  2. Upon completion, {return} will contain the numeric value as specified for the item's text.

  3. 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:

  4.  

    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.

     

  5. 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.

  6. 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

 



PL/B Language Reference GetItemImage Method (LISTVIEW) GetItemParam Method (LISTVIEW)