Expand Method (TREEVIEW)


PLBCMP GUI Only

 

The Expand method shows or hides the list of child items associated with a specified parent item. The method uses the following format:

 

[label]

{object}.Expand

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

 

 

[*Code=]{code}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A TREEVIEW object that is expanded.

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

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

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

  3.  

    Value

    Constant

    The list is ...

    0x1

    TVE_COLLAPSE

    collapsed.

    0x2

    TVE_EXPAND

    expanded.

    0x3

    TVE_TOGGLE

    collapsed if expanded and expanded if collapsed.

    0x800

    TVE_COLLAPSERESET

    collapsed and all child items removed.

 

  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 EnsureVisible Method (TREEVIEW) GetCount Method (TREEVIEW)