#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/label>
#include <xtd/forms/month_calendar>
#include <chrono>
using namespace std::chrono;
class form1 :
public form {
public:
form1() {
text(
"Month calendar example");
month_calendar1.parent(*this);
month_calendar1.location({10, 10});
month_calendar1.date_changed += [&](
object&,
const event_args &
e) {
label1.text(string::format("selection range: [{:d}, {:d}]", month_calendar1.selection_start(), month_calendar1.selection_end()));
};
label1.parent(*this);
label1.auto_size(true);
label1.location({10, 180});
label1.text(string::format("selection range: [{:d}, {:d}]", month_calendar1.selection_start(), month_calendar1.selection_end()));
}
private:
};
auto main() -> int {
}
static date_time now() noexcept
Gets a xtd::date_time object that is set to the current date and time on this computer,...
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
@ add
The Add key.
Definition console_key.hpp:170
@ subtract
The Subtract key.
Definition console_key.hpp:174
@ 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