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

Syntax 2: For ListBox and DropDownListBox controls – PB Docs 2018 – PowerBuilder Library

Syntax 2: For ListBox and DropDownListBox controls – PB Docs 2018

Syntax 2: For ListBox and DropDownListBox controls

Description

Inserts an item into the list of values in a picture list
box.

Applies to

PictureListBox and DropDownPictureListBox controls

Syntax

Argument

Description

listboxname

The name of the PictureListBox or
DropDownPictureListBox into which you want to insert an
item

item

A string whose value is the text of the item you
want to insert

pictureindex (optional)

An integer specifying the index of the picture you
want to associate with the newly added item

index

The number of the item in the list before which you
want to insert the item

Return value

Integer. Returns the final position of the item. Returns -1 if an
error occurs. If any argument’s value is null, InsertItem returns
null.

Usage

If you do not specify a picture index, the newly added item will
not have a picture.

If you specify a picture index that does not exist, that number is
still stored with the picture. If you add pictures to the picture array
so that the index becomes valid, the item will then show the
corresponding picture.

For additional notes about items in ListBoxes and examples of how
the Sorted property affects the item order, see Syntax 1.

Examples

This statement inserts the item Run Application before the fifth
item in lb_actions. The item has no picture assigned to it:

This statement inserts the item Run Application before the fifth
item in lb_actions and assigns it picture index 4:

See also

AddItem

DeleteItem

FindItem

Reset

TotalItems


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