#include <xtd/forms/Application>
#include <xtd/forms/checked_list_box>
#include <xtd/forms/form>
#include <xtd/cdebug>
namespace checked_list_box_example {
class form1 :
public form {
public:
form1() {
text(
"Checked list box example");
client_size({200, 240});
checked_list_box1.parent(*this);
checked_list_box1.location({20, 20});
checked_list_box1.size({160, 200});
for (auto index = 1; index <= 10; ++index)
checked_list_box1.items().push_back({string::format("Item {}", index), index % 2 != 0});
checked_list_box1.selected_index(0);
cdebug << string::format(
"item_check, index={}, new_value={}, current_value={}",
e.index(),
e.new_value(),
e.current_value()) <<
environment::new_line;
};
}
private:
};
}
auto main() -> int {
}
static xtd::string new_line() noexcept
Gets the newline string defined for this environment.
@ e
The E key.
Definition console_key.hpp:96
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8