Syntax 4: For ListView controls
Description
Adds an item to a ListView control by referencing all the
attributes in the ListView item.
Applies to
ListView controls
Syntax
|
1 |
listviewname.AddItem ( item ) |
|
Argument |
Description |
|---|---|
|
listviewname |
The name of the List View control to which you are |
|
item |
The ListViewItem variable containing properties of the |
Return value
Integer.
Returns the index of the item if it succeeds and -1 if an error
occurs.
Usage
Use this syntax if you need to specify all the properties for the
item you want to add. If you only need to specify the label and picture
index, use Syntax 3.
Examples
This example uses AddItem in a CommandButton Clicked event to add
a ListView item for each click:
|
1 2 3 4 5 |
count = count + 1 listviewitem l_lvi l_lvi.PictureIndex = 2 l_lvi.Label = "Item "+ string(count) lv_1.AddItem(l_lvi) |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest