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

Inserting items at the root level – PB Docs 2021 – PowerBuilder Library

Inserting items at the root level – PB Docs 2021

Inserting items at the root level

The very first item you insert does not have any sibling for
specifying a relative position, so you cannot use the
InsertItem function — you must use InsertItemFirst or InsertItemLast.
For an item inserted at the root level, you specify 0 as its
parent.

This sample code is in a user event triggered from the Open event
of the window containing the TreeView. It assumes two instance variable
arrays:

  • A string array called item_label that contains labels for all
    the items that will be inserted at the root level (here composer
    names)

  • An integer array that has values for the Data property (the
    century for each composer); the century value is for user-defined
    sorting:

After inserting all the items, this code scrolls the TreeView back
to the top and makes the first item current:


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