This documentation is archived and is not being maintained.

ItemCheckEventArgs.NewValue Property

Gets or sets a value indicating whether to set the check box for the item to be checked, unchecked, or indeterminate.

[Visual Basic]
Public Property NewValue As CheckState
[C#]
public CheckState NewValue {get; set;}
[C++]
public: __property CheckState get_NewValue();
public: __property void set_NewValue(CheckState);
[JScript]
public function get NewValue() : CheckState;
public function set NewValue(CheckState);

Property Value

One of the CheckState values.

Remarks

This property enables you to determine the new check state for the specified item before the check state is changed by the CheckedListBox control. In addition to determining the new check state, you can use this property in an event handler for the ItemCheck event to change the state to a different check state than the one specified. For example, if the user placed a check mark next to an item in the CheckedListBox that you have determined should not be checked based on the state of your application, you can override the change in the check mark state by setting this property to its previous setting or to a different check state.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ItemCheckEventArgs Class | ItemCheckEventArgs Members | System.Windows.Forms Namespace | CurrentValue

Show: