wxColourPickerCtrl Class Reference
[Picker Controls]

#include <wx/clrpicker.h>

Inheritance diagram for wxColourPickerCtrl:
Inheritance graph
[legend]

Detailed Description

This 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).

Styles

This class supports the following styles:

Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxColourPickerEvent& event)

Event macros for events emitted by this class:

Library:  wxCore
Category:  Picker Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance
See also:
wxColourDialog, wxColourPickerEvent

Public Member Functions

 wxColourPickerCtrl (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=wxColourPickerCtrlNameStr)
 Initializes the object and calls Create() with all the parameters.
bool 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=wxColourPickerCtrlNameStr)
 Creates a colour picker with the given arguments.
wxColour GetColour () const
 Returns the currently selected colour.

void SetColour (const wxColour &col)
 Sets the currently selected colour.
void SetColour (const wxString &colname)
 Sets the currently selected colour.

List of all members.


Constructor & Destructor Documentation

wxColourPickerCtrl::wxColourPickerCtrl ( 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 = wxColourPickerCtrlNameStr 
)

Initializes the object and calls Create() with all the parameters.


Member Function Documentation

bool wxColourPickerCtrl::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 = wxColourPickerCtrlNameStr 
)

Creates a colour picker with the given arguments.

Parameters:
parent Parent window, must not be non-NULL.
id The identifier for the control.
colour The initial colour shown in the control.
pos Initial position.
size Initial size.
style The window style, see wxCRLP_* flags.
validator Validator which can be used for additional date checks.
name Control name.
Returns:
true if the control was successfully created or false if creation failed.
wxColour wxColourPickerCtrl::GetColour (  )  const

Returns the currently selected colour.

void wxColourPickerCtrl::SetColour ( const wxString colname  ) 

Sets the currently selected colour.

See wxColour::Set().

void wxColourPickerCtrl::SetColour ( const wxColour col  ) 

Sets the currently selected colour.

See wxColour::Set().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



wxWidgets logo

[ top ]