xtd 0.2.0
xtd::forms::checked_list_box::item Class Reference

Definition

Represent an item contained in the checked_list_box::object_collection collection.

Constructors

 item ()=default
 Initializes a new instance of the item class. More...
 
 item (const xtd::ustring &value)
 Initializes a new instance of the item class with specified value. More...
 
 item (const xtd::ustring &value, bool checked)
 Initializes a new instance of the item class with specified value and check state. More...
 
 item (const xtd::ustring &value, forms::check_state check_state)
 Initializes a new instance of the item class with specified value and checked state. More...
 
 item (const xtd::ustring &value, const std::any &tag)
 Initializes a new instance of the item class with specified value and tag. More...
 
 item (const xtd::ustring &value, bool checked, const std::any &tag)
 Initializes a new instance of the item class with specified value, check state and tag. More...
 
 item (const xtd::ustring &value, forms::check_state check_state, const std::any &tag)
 Initializes a new instance of the item class with specified value, check state and tag. More...
 

Properties

virtual bool checked () const
 Gets a value indicating whether the item is in the checked state. More...
 
virtual forms::check_state check_state () const
 Gets the state of the item. More...
 

Methods

int32 compare_to (const item &value) const noexcept override
 
bool equals (const item &value) const noexcept override
 

Additional Inherited Members

- Public Member Functions inherited from xtd::icomparable< item >
virtual int32 compare_to (const item &obj) const noexcept=0
 Compares the current instance with another object of the same type. More...
 
- Public Member Functions inherited from xtd::iequatable< item >
virtual bool equals (const item &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type. More...
 

Constructor & Destructor Documentation

◆ item() [1/7]

xtd::forms::checked_list_box::item::item ( )
default

Initializes a new instance of the item class.

◆ item() [2/7]

xtd::forms::checked_list_box::item::item ( const xtd::ustring value)

Initializes a new instance of the item class with specified value.

Parameters
valuea string that represent the item.

◆ item() [3/7]

xtd::forms::checked_list_box::item::item ( const xtd::ustring value,
bool  checked 
)

Initializes a new instance of the item class with specified value and check state.

Parameters
valuea string that represent the item.
checkeda bool that represent check state.

◆ item() [4/7]

xtd::forms::checked_list_box::item::item ( const xtd::ustring value,
forms::check_state  check_state 
)

Initializes a new instance of the item class with specified value and checked state.

Parameters
valuea string that represent the item.
check_statea bool that represent check state.

◆ item() [5/7]

xtd::forms::checked_list_box::item::item ( const xtd::ustring value,
const std::any tag 
)

Initializes a new instance of the item class with specified value and tag.

Parameters
valuea string that represent the item.
tagan object that contains data about the item.

◆ item() [6/7]

xtd::forms::checked_list_box::item::item ( const xtd::ustring value,
bool  checked,
const std::any tag 
)

Initializes a new instance of the item class with specified value, check state and tag.

Parameters
valuea string that represent the item.
checkeda bool that represent check state.
tagan object that contains data about the item.

◆ item() [7/7]

xtd::forms::checked_list_box::item::item ( const xtd::ustring value,
forms::check_state  check_state,
const std::any tag 
)

Initializes a new instance of the item class with specified value, check state and tag.

Parameters
valuea string that represent the item.
checkeda bool that represent check state.
tagan object that contains data about the item.

Member Function Documentation

◆ check_state()

virtual forms::check_state xtd::forms::checked_list_box::item::check_state ( ) const
virtual

Gets the state of the item.

Returns
One of the check_state enumeration values. The default value is unchecked.
Remarks
If the three_state property is set to false, the check_state property value can only be set to check_state::indeterminate in code and not by u ser interaction.

◆ checked()

virtual bool xtd::forms::checked_list_box::item::checked ( ) const
virtual

Gets a value indicating whether the item is in the checked state.

Returns
true if the item is in the checked state; otherwise, false. The default value is false. If the three_state property is set to true, the checked property will return true for either a checked or indeterminate check_state.

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