*/
#define wxPG_ATTR_INLINE_HELP wxS("InlineHelp")
+/** Universal, wxArrayString. Set to enable auto-completion in any
+ wxTextCtrl-based property editor.
+*/
+#define wxPG_ATTR_AUTOCOMPLETE wxS("AutoComplete")
+
/** wxBoolProperty specific, int, default 0. When 1 sets bool property to
use checkbox instead of choice.
*/
#define wxPG_DATE_FORMAT wxS("DateFormat")
/** Sets wxDatePickerCtrl window style used with wxDateProperty. Default
- is wxDP_DEFAULT | wxDP_SHOWCENTURY.
+ is wxDP_DEFAULT | wxDP_SHOWCENTURY. Using wxDP_ALLOWNONE will enable
+ better unspecified value support in the editor.
*/
#define wxPG_DATE_PICKER_STYLE wxS("PickerStyle")
Simple string property. wxPG_STRING_PASSWORD attribute may be used
to echo value as asterisks and use wxTE_PASSWORD for wxTextCtrl.
+ wxPG_ATTR_AUTOCOMPLETE attribute may be used to enable auto-completion
+ (use a wxArrayString value), and is also supported by any property that
+ happens to use a wxTextCtrl-based editor.
@remarks wxStringProperty has a special trait: if it has value of
"<composed>", and also has child properties, then its displayed
string wxDateTime::Format uses (altough default is recommended as it is
locale-dependant), and wxPG_DATE_PICKER_STYLE allows changing window
style given to DatePickerCtrl (default is wxDP_DEFAULT|wxDP_SHOWCENTURY).
+ Using wxDP_ALLOWNONE will enable better unspecified value support.
@subsection wxEditEnumProperty
*/
bool SetChoices( wxPGChoices& choices );
- /**
- If property has choices and they are not yet exclusive, new such copy
- of them will be created.
- */
- void SetChoicesExclusive();
-
/**
Sets client data (void*) of a property.
Pointer to list variant that contains child values. Used to indicate
which children should be marked as modified. Usually you just use @NULL.
@param flags
- Use wxPG_SETVAL_REFRESH_EDITOR to update editor control, if it
- was selected.
+ wxPG_SETVAL_REFRESH_EDITOR is set by default, to refresh editor
+ and redraw properties.
*/
- void SetValue( wxVariant value, wxVariant* pList = NULL, int flags = 0 );
+ void SetValue( wxVariant value, wxVariant* pList = NULL,
+ int flags = wxPG_SETVAL_REFRESH_EDITOR );
/**
Set wxBitmap in front of the value. This bitmap may be ignored
@class wxPGChoices
Helper class for managing choices of wxPropertyGrid properties.
- Each entry can have label, value, bitmap, text colour, and background colour.
+ Each entry can have label, value, bitmap, text colour, and background
+ colour.
+
+ wxPGChoices uses reference counting, similar to other wxWidgets classes.
+ This means that assignment operator and copy constructor only copy the
+ reference and not the actual data. Use Copy() member function to create a
+ real copy.
+
+ @remarks If you do not specify value for entry, index is used.
@library{wxpropgrid}
@category{propgrid}
*/
wxPGChoices();
- /** Copy constructor. */
+ /**
+ Copy constructor, uses reference counting. To create a real copy,
+ use Copy() member function instead.
+ */
wxPGChoices( const wxPGChoices& a );
/** Constructor. */
wxPGChoiceEntry& AddAsSorted( const wxString& label, int value = wxPG_INVALID_VALUE );
/**
- Assigns data from another set of choices.
+ Assigns choices data, using reference counting. To create a real copy,
+ use Copy() member function instead.
*/
void Assign( const wxPGChoices& a );
*/
void Clear();
+ /**
+ Returns a real copy of the choices.
+ */
+ wxPGChoices Copy() const;
+
/**
Returns labe of item.
*/
/**
Creates exclusive copy of current choices.
*/
- void SetExclusive();
+ void AllocExclusive();
/**
Returns array of choice labels.