ListBox.SetItemCheck

ListBox.SetItemCheck (

string ObjectName,

number Index,

number CheckboxState )

Description

Sets the checkbox state of a specific item in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) of the item whose checkbox state you want to set. You can use an index of -1 to access the last item in the list, and -2 (LB_ALLCHECKS) to apply the change to all items in the list.

CheckboxState

(number) The checkbox state you want to set for the item.

CONSTANT

VALUE

DESCRIPTION

BST_UNCHECKED

0

The item's checkbox is unchecked.

BST_CHECKED

1

The item's checkbox is checked.

BST_INDETERMINATE

2

The item's checkbox is in an "indeterminate" state. Usually used to indicate a "mix" of checked and unchecked items.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

See also: Related Actions