Contents Up Previous Next

wxDataViewColumn

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

wxObject

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::wxDataViewColumn

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::~wxDataViewColumn

~wxDataViewColumn()

Destructor.


wxDataViewColumn::GetBitmap

const wxBitmap& GetBitmap()

Returns the bitmap in the header of the column, if any.


wxDataViewColumn::GetModelColumn

unsigned int GetModelColumn()

Returns the index of the column of the model, which this wxDataViewColumn is displaying.


wxDataViewColumn::GetOwner

wxDataViewCtrl* GetOwner()

Returns the owning wxDataViewCtrl.


wxDataViewColumn::GetRenderer

wxDataViewRenderer* GetRenderer()

Returns the renderer of this wxDataViewColumn.

See also wxDataViewRenderer.


wxDataViewColumn::GetSortable

bool GetSortable()

Returns true if the column is sortable.

See SetSortable


wxDataViewColumn::GetWidth

int GetWidth()

Returns the width of the column.


wxDataViewColumn::IsSortOrderAscending

bool IsSortOrderAscending()

Returns true, if the sort order is ascending.

See also SetSortOrder


wxDataViewColumn::SetAlignment

void SetAlignment(wxAlignment align)

Set the alignment of the column header.


wxDataViewColumn::SetBitmap

void SetBitmap(const wxBitmap& bitmap)

Set the bitmap of the column header.


wxDataViewColumn::SetSortOrder

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.


wxDataViewColumn::SetSortable

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.


wxDataViewColumn::SetTitle

void SetTitle(const wxString& title)

Set the title of the column header to title.