The following code example demonstrate the use of color_picker picker.
- Windows
-
- macOS
-
- Gnome
-
#include <xtd/xtd>
namespace examples {
class form1 : public form {
public:
form1() {
text("Color picker example");
test_zone.parent(*this);
test_zone.location({10, 50});
test_zone.border_style(border_style::fixed_3d);
color_picker.parent(*this);
color_picker.color(test_zone.back_color());
color_picker.location({10, 10});
color_picker.color_changed += [&] {
test_zone.back_color(color_picker.color());
};
}
private:
panel test_zone;
};
}
int main() {
application::run(examples::form1());
}
static const xtd::drawing::color red
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
Definition: color.h:390
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