Navigation:  thinBasic Modules > UI (User Interface) > Dedicated Control Functions > ListView Control > ListView: Columns functions >

ListView_InsertColumn

Previous pageReturn to chapter overviewNext page

 

Description

 

Inserts a new column in a list-view control.

 

Syntax

 

n = ListView_InsertColumn(hWnd, ctrlID, ColumnIndex, cSize, sText [, lMask [, lFormat]])

 

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

ColumnIndex

Number

No

Column index. Starts from 1

cSize

Number

No

Width of the column, in pixels.

sText

Number

No

String that contains the column header text

lMask

Number

Yes

Variable specifying which members contain valid information. One or more of the following equates:

%LVCF_FMT

%LVCF_WIDTH

%LVCF_TEXT

%LVCF_SUBITEM

%LVCF_IMAGE

%LVCF_ORDER

%LVCF_MINWIDTH

%LVCF_DEFAULTWIDTH

%LVCF_IDEALWIDTH

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

%LVCF_FMT OR %LVCF_TEXT OR %LVCF_WIDTH

lFormat

Number

Yes

Alignment of the column header and the subitem text in the column. The alignment of the leftmost column is always left-justified; it cannot be changed. This member can be one of the following values:

%LVCFMT_LEFT

%LVCFMT_RIGHT

%LVCFMT_CENTER

%LVCFMT_JUSTIFYMASK

%LVCFMT_IMAGE

%LVCFMT_BITMAP_ON_RIGHT

%LVCFMT_COL_HAS_IMAGES

%LVCFMT_FIXED_WIDTH

%LVCFMT_NO_DPI_SCALE

%LVCFMT_FIXED_RATIO

%LVCFMT_SPLITBUTTON

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

%LVCFMT_LEFT

 

Remarks

 

Restrictions

 

See also

 

Examples