ListView_InsertItem

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Types > ListView Control > Listview Control Commands > ListView: Items functions >

ListView_InsertItem

 

Description

 

Inserts a new item in a list-view control.

 

Syntax

 

n = ListView_InsertItem(hWnd, ctrlID, RowIndex, sText [, lMask])

 

Returns

 

Number

 

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 ...

RowIndex

Number

No

Row index. Starts from 1

sText

String

No

A string containing the item text.

lMask

Number

Yes

Set of flags that specify which members of this structure contain data to be set or which members are being requested. This member can have one or more of the following flags set:

%LVIF_COLFMT

%LVIF_COLUMNS

%LVIF_DI_SETITEM

%LVIF_GROUPID

%LVIF_IMAGE

%LVIF_INDENT

%LVIF_NORECOMPUTE

%LVIF_PARAM

%LVIF_STATE

%LVIF_TEXT

 

If this member is zero or omitted, the following default value will be used:

%LVIF_TEXT or %LVIF_PARAM or %LVIF_STATE

 

Remarks

 

More items text can be indicated using "|" char as separator. For example:
"File|Description|Size"
This can avoid multiple subsequent calls to ListView_SetItem.

If RowIndex is <= 0, a new item will be added at the bottom

 

Restrictions

 

See also

 

Examples