xtd 0.2.0
Loading...
Searching...
No Matches
find_box.cpp

demonstrates the use of xtd::forms::find_box dialog.

Windows

macOS

Gnome

#include <xtd/diagnostics/debug>
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/debug_form>
#include <xtd/forms/find_box>
#include <xtd/forms/form>
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Find box example");
find_button.parent(*this);
find_button.text("find...");
find_button.location({10, 10});
find_button.click += [&] {
find_box::show(*this, "Gammasoft", "Find", [&](object& sender, const find_event_args& e) {
diagnostics::debug::write_line(string::format("Find next : find string [{}], match case [{}], search direction [{}], whole word [{}]", e.find_string(), e.match_case(), e.search_direction(), e.whole_word()));
});
};
}
private:
button find_button;
};
auto main() -> int {
auto df = debug_form {};
application::run(form1 {});
}
Represents a Windows button control.
Definition button.hpp:49
Represents a form that displays debug form. This class cannot be inherited.
Definition debug_form.hpp:36
Provides data for the xtd::forms::find_dialog::find_next and xtd::forms::replace_dialog::find_next ev...
Definition find_event_args.hpp:25
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10