This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Add new items and set items properties taking data from a string array or string matrix.
Syntax
n = ListView_InsertData(hWnd, ctrlID, StringArrayOrMatrix [, RowStart [, HowManyRows]])
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) |
RowStart |
Number |
Yes |
If present, it can be used to specify from which row of the array/matrix to start to keep data. If not present or less than 1, 1 will be assumed. |
HowManyRows |
Number |
Yes |
If present, it can be used to limit the number of rows to consider starting from RowStart position. |
Remarks
Programmer does not need to worry about RowStart/HowManyRows usage exceed array/matrix boundaries. thinBasic will automatically detect it.
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()
'...