wxcolourpickerctrlthis control allows the user to select a colour. the generic implementation is a button which brings up a wxcolourdialog when clicked. native implementation may differ but this is usually a (small) widget which give access to the colour-chooser dialog. it is only available if wxuse_colourpickerctrl is set to 1 (the default). derived from
wxpickerbase include files <wx/clrpicker.h> window styles
event handling to process a colour picker event, use these event handler macros to direct input to member functions that take a wxcolourpickerevent argument.
see also
wxcolourdialog, members
wxcolourpickerctrl::wxcolourpickerctrl
wxcolourpickerctrl::wxcolourpickerctrlwxcolourpickerctrl(wxwindow *parent, wxwindowid id, const wxcolour& colour = *wxblack, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxclrp_default_style, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "colourpickerctrl") initializes the object and calls create with all the parameters.
wxcolourpickerctrl::createbool create(wxwindow *parent, wxwindowid id, const wxcolour& colour = *wxblack, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxclrp_default_style, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "colourpickerctrl") parameters parent
id
colour
pos
size
style
validator
name
return value true if the control was successfully created or false if creation failed.
wxcolourpickerctrl::getcolourwxcolour getcolour() const returns the currently selected colour.
wxcolourpickerctrl::setcolourvoid setcolour(const wxcolour &col) void setcolour(const wxstring &colname) sets the currently selected colour. see wxcolour::set.
|