@since 2.9.1
- @param variable
+ @param variant
The new value.
@param item
The item (row) to update.
- wxDataViewBitmapRenderer,
- wxDataViewDateRenderer,
- wxDataViewSpinRenderer.
+ - wxDataViewChoiceRenderer.
Additionally, the user can write own renderers by deriving from
wxDataViewCustomRenderer.
a small icon next to it as it is typically done in a file manager.
This classes uses the wxDataViewIconText helper class to store its data.
- wxDataViewIonText can be converted to and from a wxVariant using the left shift
- operator.
+ wxDataViewIconText can be converted to and from a wxVariant using the left
+ shift operator.
@library{wxadv}
@category{dvc}
};
+/**
+ @class wxDataViewChoiceRenderer
+
+ This class is used by wxDataViewCtrl to render choice controls.
+ It stores a string so that SetValue() and GetValue() operate
+ on a variant holding a string.
+
+ @library{wxadv}
+ @category{dvc}
+*/
+
+class wxDataViewChoiceRenderer: public wxDataViewRenderer
+{
+public:
+ /**
+ The ctor.
+ */
+ wxDataViewChoiceRenderer( const wxArrayString &choices,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
+ int alignment = wxDVR_DEFAULT_ALIGNMENT );
+
+ /**
+ Returns the choice referred to by index.
+ */
+ wxString GetChoice(size_t index) const;
+
+ /**
+ Returns all choices.
+ */
+ const wxArrayString& GetChoices() const;
+};
+
/**
@class wxDataViewDateRenderer