diff --git a/interface/wx/propgrid/advprops.h b/interface/wx/propgrid/advprops.h
index 38bfa51889..7917df020f 100644
--- a/interface/wx/propgrid/advprops.h
+++ b/interface/wx/propgrid/advprops.h
@@ -95,6 +95,9 @@ public:
@ingroup classes
Has dropdown list of wxWidgets system colours. Value used is
of wxColourPropertyValue type.
+
+ Supported special attributes:
+ ::wxPG_COLOUR_ALLOW_CUSTOM, ::wxPG_COLOUR_HAS_ALPHA
*/
class wxSystemColourProperty : public wxEnumProperty
{
@@ -168,6 +171,14 @@ protected:
+/** @class wxColourProperty
+ @ingroup classes
+ Allows to select a colour from the list or with colour dialog. Value used
+ is of wxColourPropertyValue type.
+
+ Supported special attributes:
+ ::wxPG_COLOUR_ALLOW_CUSTOM, ::wxPG_COLOUR_HAS_ALPHA
+*/
class wxColourProperty : public wxSystemColourProperty
{
public:
diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h
index 2cab67c25a..b0748f2601 100644
--- a/interface/wx/propgrid/property.h
+++ b/interface/wx/propgrid/property.h
@@ -206,9 +206,9 @@ struct wxPGPaintData
*/
#define wxPG_ATTR_MULTICHOICE_USERSTRINGMODE wxS("UserStringMode")
-/** Built-in attribute of wxColourProperty and its kind, type of @c int,
- default value is 1. Setting this attribute to 0 hides custom colour
- from property's list of choices.
+/** Built-in attribute of wxColourProperty and its kind, type of @c bool,
+ default value is @true. Setting this attribute to @false hides custom
+ colour from property's list of choices.
*/
#define wxPG_COLOUR_ALLOW_CUSTOM wxS("AllowCustom")
diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp
index 1d84ae5c9a..852d91790f 100644
--- a/src/propgrid/advprops.cpp
+++ b/src/propgrid/advprops.cpp
@@ -1571,16 +1571,16 @@ bool wxSystemColourProperty::DoSetAttribute( const wxString& name, wxVariant& va
{
if ( name == wxPG_COLOUR_ALLOW_CUSTOM )
{
- int ival = value.GetLong();
+ bool allow = value.GetBool();
- if ( ival && (m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
+ if ( allow && (m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
{
// Show custom choice
/* TRANSLATORS: Custom colour choice entry */
m_choices.Add(_("Custom"), wxPG_COLOUR_CUSTOM);
m_flags &= ~(wxPG_PROP_HIDE_CUSTOM_COLOUR);
}
- else if ( !ival && !(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
+ else if ( !allow && !(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
{
// Hide custom choice
m_choices.RemoveAt(GetCustomColourIndex());