This class represents a column in a wxDataViewCtrl. One wxDataViewColumn is bound to one column in the data model, to which the wxDataViewCtrl has been associated.
An instance of wxDataViewRenderer is used by this class to render its data.
Constants
These flags define behavi
enum wxDataViewColumnFlags
{
wxDATAVIEW_COL_RESIZABLE = 1, // the user can resize the column
wxDATAVIEW_COL_SORTABLE = 2, // same as SetSortable()
wxDATAVIEW_COL_HIDDEN = 4 // column is hidden
};
Derived from
Include files
<wx/dataview.h>
wxDataViewColumn::wxDataViewColumn
wxDataViewColumn::~wxDataViewColumn
wxDataViewColumn::GetBitmap
wxDataViewColumn::GetModelColumn
wxDataViewColumn::GetOwner
wxDataViewColumn::GetRenderer
wxDataViewColumn::GetSortable
wxDataViewColumn::GetWidth
wxDataViewColumn::IsSortOrderAscending
wxDataViewColumn::SetAlignment
wxDataViewColumn::SetBitmap
wxDataViewColumn::SetSortOrder
wxDataViewColumn::SetSortable
wxDataViewColumn::SetTitle
wxDataViewColumn(const wxString& title, wxDataViewRenderer* renderer, unsigned int model_column, int width = 80, int flags = wxDATAVIEW_COL_RESIZABLE)
wxDataViewColumn(const wxBitmap& bitmap, wxDataViewRenderer* renderer, unsigned int model_column, int width = 80, int flags = wxDATAVIEW_COL_RESIZABLE)
Constructors.
~wxDataViewColumn()
Destructor.
const wxBitmap& GetBitmap()
Returns the bitmap in the header of the column, if any.
unsigned int GetModelColumn()
Returns the index of the column of the model, which this wxDataViewColumn is displaying.
wxDataViewCtrl* GetOwner()
Returns the owning wxDataViewCtrl.
wxDataViewRenderer* GetRenderer()
Returns the renderer of this wxDataViewColumn.
See also wxDataViewRenderer.
bool GetSortable()
Returns true if the column is sortable.
See SetSortable
int GetWidth()
Returns the width of the column.
bool IsSortOrderAscending()
Returns true, if the sort order is ascending.
See also SetSortOrder
void SetAlignment(wxAlignment align)
Set the alignment of the column header.
void SetBitmap(const wxBitmap& bitmap)
Set the bitmap of the column header.
void SetSortOrder(bool ascending)
Indicate the sort order if the implementation of the wxDataViewCtrl supports it, most commonly by showing a little arrow. Use this in conjunction with wxDataViewSortedListModel::SetAscending to sort the actual data.
void SetSortable(bool sortable)
Indicate that the column is sortable. This is only to provide a visual hint in the column (such as a sort order indicator). It will not actually sort the data. Use a wxDataViewSortedListModel to so the sorting.
void SetTitle(const wxString& title)
Set the title of the column header to title.