Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

CollapseItem – PB Docs 2019 – PowerBuilder Library

CollapseItem – PB Docs 2019

CollapseItem

PowerScript function

Description

Collapses the specified item.

Applies to

TreeView controls

Syntax

Argument

Description

treeviewname

The TreeView control in which you want to collapse an
item

itemhandle

The handle of the item you want to collapse

Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs.

Usage

If there is only one level-one entry, you can use the RootTreeItem
handle as the argument to collapse the tree so that only the top-level
node is displayed. However, CollapseItem collapses only the current item,
so that if the children of the top-level item were expanded when the tree
was collapsed, they will still be expanded when the top-level item is
expanded.

If there is more than one level-one entry, using the RootTreeItem
handle as the argument collapses only the first level-one entry.

Examples

This example collapses an item in a TreeView control:

This example collapses the top-level item in a TreeView control that
has only one level-one entry:

See also

ExpandItem

ExpandAll

FindItem


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x