The following code example demonstrate the use of color_dialog dialog.
- Windows
-
- macOS
-
- Gnome
-
#include <xtd/xtd>
using namespace std;
class form1 : public form {
public:
form1() {
text("Color dialog example");
color_dialog color_dialog;
color_dialog.color(back_color());
color_dialog.custom_colors(custom_colors);
back_color(color_dialog.color());
custom_colors = color_dialog.custom_colors();
};
}
private:
vector<color> custom_colors = {color::red, color::green, color::blue, color::yellow, system_colors::control()};
};
int main() {
application::run(form1());
}
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition: bitmap.h:11
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17