Navigation:  thinBasic Modules > UI (User Interface) > CONTROLs > Dedicated Control Functions > LISTVIEW Control > ListView: Items functions >

ListView_SetItemState

Previous pageReturn to chapter overviewNext page

 

Description

 

Changes the state of an item in a list-view control.

 

Syntax

 

n = ListView_SetItemState(hWnd, ctrlID, lItem, lState, 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 ...

lItem

Number

No

Row index. Starts from 1

lState

Number

No

New state bits for the item. The mask parameter indicates the valid bits of the state parameter. The macro ignores bits in the state parameter if the corresponding bit is not set in the mask parameter. The low-order byte contains a set of bit flags that indicate the item's state. This byte can be a combination of the following values:

%LVIS_CUT

The item is marked for a cut-and-paste operation.

%LVIS_DROPHILITED

The item is highlighted as a drag-and-drop target.

%LVIS_FOCUSED

The item has the focus, so it is surrounded by a standard focus rectangle. Although more than one item may be selected, only one item can have the focus.

%LVIS_SELECTED

The item is selected.

lMask

Number

Yes

The mask parameter specifies the state bits you want to modify, and the state parameter specifies the new value for those bits. To set a bit in the item's internal state, set it in both the mask and state parameters. To clear a bit in the item's internal state, set it in the mask parameter and clear it in the state parameter. To leave a bit unchanged in the item's internal state, clear it in the mask parameter.

 

Remarks

 

Restrictions

 

See also

 

Examples

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com