SelectItem Method (TREEVIEW)


PLBCMP GUI Only

 

The SelectItem method highlights the given TREEVIEW item, scrolls it into view, and redraws it. The method uses the following format:

 

[label]

{object}.SelectItem

[GIVING {return}] USING [*Item=]{item}:

 

 

[*Code=]{code}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A TREEVIEW object accessed.

return

Optional. A Numeric Variable that indicates the success or failure of the method.

item

Required. A decimal number or Numeric Variable that indicates the handle of the item to select.

code

Required. A decimal number or Numeric Variable that indicates an action from the table below.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. {item} is an item handle indicating the item within the object to select.

  2. {code} is a variable, literal or a constant as defined in PLBMETH.INC indicating one of the following actions:

  3.  

    Value

    Constant

    Action

    0x9

    TVGN_CARET

    Sets the selection to the specified item. If the item is a child of a collapsed parent item, the parent's list is expanded to reveal the item.

    0x8

    TVGN_DROPHILITE

    Redraws the given item in the style used to indicate the target of a drag-and-drop operation.

    0x5

    TVGN_FIRSTVISIBLE

    Scrolls the object vertically making the specified item the first visible item.

 

  1. Upon completion, {return} will contain the status of the method as follows. $TRUE and $FALSE are defined in PLBEQU.INC:

  2.  

    Value

    Constant

    The method ...

    0

    $FALSE

    failed.

    1

    $TRUE

    was successful.

 

  1. If the value returned is zero, the ZERO Condition Flag is set.

  2. The OVER and EOS Condition Flags are always cleared.

  3. For improved performance in the Application Server environment, do not specify the optional return value unless needed.

 

 

See Also: Method Syntax, TREEVIEW Methods

 



PL/B Language Reference SaveXMLtoDim Method (TREEVIEW) SetFileOptions Methd (TREEVIEW)