Navigation: thinBasic Modules > UI (User Interface) > CONTROLs > Dedicated Control Functions > LISTVIEW Control > ListView: General functions > ListView_InsertData |
![]() ![]() ![]() |
Description
Add new items and set items properties taking data from a string array or string matrix.
Syntax
n = ListView_InsertData(hWnd, ctrlID, StringArrayOrMatrix)
Returns
Number.
Number of rows added
Parameters
Name |
Type |
Optional |
Meaning |
hWnd |
Number |
No |
Handle of the dialog containing the list-view control |
ctrlID |
Number |
No |
Control identifier assigned to the control during CONTROL ADD ... |
StringArrayOrMatrix |
Variable |
No |
A string array (one dimension) or a string matrix (two dimensions) |
Remarks
Restrictions
See also
Examples
'...
'---Assign data to 2 dimension matrix
Dim s(5, 3) As String
s(1,1) = "Folder 1", "1", "Whatever data here regarding Folder 1"
s(2,1) = "Folder 2", "2", "Whatever data here regarding Folder 2"
s(3,1) = "Folder 3", "3", "Whatever data here regarding Folder 3"
s(4,1) = "Folder 4", "4", "Whatever data here regarding Folder 4"
s(5,1) = "Folder 5", "5", "Whatever data here regarding Folder 5"
'---ListView columns must be already in place
'---Add full matrix data to listview
LISTVIEW_InsertData hDlg, %ID_LV_LEFT, s()
'...
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |