Skip to main content
Version: 3.5

CheckedListBox

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Displays a ListBox in which a check box is displayed to the left of each item.

public class CheckedListBox : ListBox

Constructors

Instance memberCheckedListBox()

Initializes a new instance of the CheckedListBox class.

Instance memberCheckedListBox(onItemCheck)

Initializes a new instance of the CheckedListBox class.

NameTypeDescription
onItemCheckAction<Object, ItemCheckEventArgs>Optional ItemCheck handler.

Instance memberCheckedListBox(dataSource, displayMember, valueMember, iconMember, checkStateMember, onItemCheck)

Initializes a new instance of CheckedListBox class with the specified settings.

NameTypeDescription
dataSourceObjectInitial DataSource.
displayMemberStringInitial DisplayMember.
valueMemberStringInitial ValueMember.
iconMemberStringInitial IconMember.
checkStateMemberStringInitial CheckStateMember.
onItemCheckAction<Object, ItemCheckEventArgs>Optional ItemCheck handler.

Instance memberCheckedListBox(location, size, onItemCheck)

Initializes a new instance of the CheckedListBox class with the specified settings.

NameTypeDescription
locationPointInitial location.
sizeSizeInitial size.
onItemCheckAction<Object, ItemCheckEventArgs>Optional ItemCheck handler.

Instance memberCheckedListBox(location, size, dataSource, displayMember, valueMember, iconMember, checkStateMember, onItemCheck)

Initializes a new instance of the CheckedListBox class with the specified settings.

NameTypeDescription
locationPointInitial location.
sizeSizeInitial size.
dataSourceObjectInitial DataSource.
displayMemberStringInitial DisplayMember.
valueMemberStringInitial ValueMember.
iconMemberStringInitial IconMember.
checkStateMemberStringInitial CheckStateMember.
onItemCheckAction<Object, ItemCheckEventArgs>Optional ItemCheck handler.

Properties

Instance memberCheckedIndices

CheckedIndexCollection: Collection of checked indexes in the CheckedListBox.

Instance memberCheckedItems

CheckedObjectCollection: Collection of checked items in the CheckedListBox.

Instance memberCheckOnClick

Boolean: Returns or sets whether list items are checked when they are clicked. The default is to check the item when clicking on the checkbox icon. (Default: False)

Instance memberCheckStateMember

String: Returns or sets the property to bind to the CheckState of the items in the CheckedListBox control. (Default: "")

Instance memberItems

ObjectCollection: Returns the collection of items in this CheckedListBox.

Methods

Instance memberClearChecked()

Unchecks all items in the CheckedListBox.

Instance memberGetItemChecked(index)

Returns a value indicating whether the specified item is checked.

ParameterTypeDescription
indexInt32The index of the item.

Returns: Boolean. true if the item is checked; otherwise, false.

Throws:

  • ArgumentException The index specified is less than zero; or the index specified is greater than or equal to the count of items in the list.

Instance memberGetItemCheckState(index)

Returns a value indicating the check state of the current item.

ParameterTypeDescription
indexInt32The index of the item to get the checked value of.

Returns: CheckState. One of the CheckState values.

Throws:

  • ArgumentOutOfRangeException The index specified is less than zero; or the index specified is greater than or equal to the count of items in the list.

Instance memberSetItemChecked(index, value)

Sets CheckState for the item at the specified index to Checked.

ParameterTypeDescription
indexInt32The index of the item to set the check state for.
valueBooleantrue to set the item as checked; otherwise, false.

Throws:

  • ArgumentException The index specified is less than zero; or the index is greater than the count of items in the list.

Instance memberSetItemCheckState(index, value)

Sets the check state of the item at the specified index.

ParameterTypeDescription
indexInt32The index of the item to set the state for.
valueCheckStateOne of the CheckState values.

Throws:

  • ArgumentOutOfRangeException The index specified is less than zero; or the index is greater than or equal to the count of items in the list.

Events

Instance memberAfterItemCheck

ItemCheckEventHandler Fired after the checked state of an item changes.

Instance memberCheckStateMemberChanged

EventHandler Fired when the CheckStateMember property changes.

Instance memberClick

EventHandler Fired when the user clicks the CheckedListBox control.

Instance memberItemCheck

ItemCheckEventHandler Fired when the checked state of an item changes.

Instance memberMouseClick

MouseEventHandler Fired when the user clicks the CheckedListBox control with the mouse.

Implements

NameDescription
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
ILabelProvides access to the LabelWrapper associated with the controls that implement this interface.
IReadOnlyProvides access to the ReadOnly property for coontrols that support the read-only mode.
IModifiedProvides access to the Modified property and ModifiedChanged event for controls that implement this interface.
IValidationProvides access to the validation events and properties property for controls that support validation.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.