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.