xtd 1.0.0
Loading...
Searching...
No Matches
xtd::forms::item_check_event_args Class Reference
Inheritance diagram for xtd::forms::item_check_event_args:
xtd::event_args xtd::object

Definition

Provides data for the item_check event of the checked_list_box and list_view controls.

Header
#include <xtd/forms/item_check_event_args>
Namespace
xtd::forms
Library
xtd.forms
Remarks
The item_check event occurs when the checked state of an item in a checked list box changes. The item_check_event_args class specifies the index of the item to change, the current value of the check box for the item, and the new value to set for the check box.

Public Constructors

 item_check_event_args (xtd::usize index, check_state new_value, check_state current_value)
 Initializes a new instance of the item_check_event_args class.

Public Properties

check_state current_value () const noexcept
 Gets a value indicating the current state of the item's check box.
xtd::usize index () const noexcept
 Gets the zero-based index of the item to change.
check_state new_value () const noexcept
 Gets a value indicating whether to set the check box for the item to be checked, unchecked, or indeterminate.
void new_value (check_state new_value)
 Gets a value indicating whether to set the check box for the item to be checked, unchecked, or indeterminate.

Additional Inherited Members

static const event_args empty
 Provides a value to use with events that do not have event data.
 event_args ()=default
 Initializes a new instance of the event_args class.
 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto equals (const object &obj) const noexcept -> bool
 Determines whether the specified object is equal to the current object.
virtual auto get_hash_code () const noexcept -> xtd::usize
 Serves as a hash function for a particular type.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
virtual auto to_string () const -> xtd::string
 Returns a xtd::string that represents the current object.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.

Constructor & Destructor Documentation

◆ item_check_event_args()

xtd::forms::item_check_event_args::item_check_event_args ( xtd::usize index,
check_state new_value,
check_state current_value )
inline

Initializes a new instance of the item_check_event_args class.

Parameters
indexThe zero-based index of the item to change.
new_valueOne of the check_state values that indicates whether to change the check box for the item to be checked, unchecked, or indeterminate.
current_valueOne of the check_state values that indicates whether the check box for the item is currently checked, unchecked, or indeterminate.

Member Function Documentation

◆ current_value()

check_state xtd::forms::item_check_event_args::current_value ( ) const
inlinenoexcept

Gets a value indicating the current state of the item's check box.

Returns
One of the check_state values.
Remarks
This property enables you to determine the check state of the specified item in the checked_list_box before the check state change to apply is made.

◆ index()

xtd::usize xtd::forms::item_check_event_args::index ( ) const
inlinenoexcept

Gets the zero-based index of the item to change.

Returns
The zero-based index of the item to change.
Remarks
You can use this property to determine which item's check box in the checked_list_box is being changed.

◆ new_value() [1/2]

check_state xtd::forms::item_check_event_args::new_value ( ) const
inlinenoexcept

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

Returns
One of the check_state values.
Remarks
This property enables you to determine the new check state for the specified item before the check state is changed by the checked_list_box 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 checked_list_box 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.

◆ new_value() [2/2]

void xtd::forms::item_check_event_args::new_value ( check_state new_value)
inline

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

Parameters
new_valueOne of the check_state values.
Remarks
This property enables you to determine the new check state for the specified item before the check state is changed by the checked_list_box 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 checked_list_box 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.

The documentation for this class was generated from the following file: