# wxDataViewColumn Class Reference
[wxDataViewCtrl Related Classes]

`#include </home/work/projects/wx/2.9/wx/interface/wx/dataview.h>`

Inheritance diagram for wxDataViewColumn:
[legend]

## Detailed Description

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.

##

Library: wxAdvanced
Category: wxDataViewCtrl Related Classes

## Public Member Functions

| wxDataViewColumn (const wxString &title, wxDataViewRenderer *renderer, unsigned int model_column, int width=wxDVC_DEFAULT_WIDTH, wxAlignment align=wxALIGN_CENTER, int flags=wxDATAVIEW_COL_RESIZABLE)
| Constructs a text column.
| wxDataViewColumn (const wxBitmap &bitmap, wxDataViewRenderer *renderer, unsigned int model_column, int width=wxDVC_DEFAULT_WIDTH, wxAlignment align=wxALIGN_CENTER, int flags=wxDATAVIEW_COL_RESIZABLE)
| Constructs a bitmap column.
unsigned int | GetModelColumn () const
| Returns the index of the column of the model, which this wxDataViewColumn is displaying.
wxDataViewCtrl * | GetOwner () const
| Returns the owning wxDataViewCtrl.
wxDataViewRenderer * | GetRenderer () const
| Returns the renderer of this wxDataViewColumn.

List of all members.

## Constructor & Destructor Documentation

wxDataViewColumn::wxDataViewColumn | ( | const wxString & | title,
|  | wxDataViewRenderer * | renderer,
|  | unsigned int | model_column,
|  | int | width = `wxDVC_DEFAULT_WIDTH`,
|  | wxAlignment | align = `wxALIGN_CENTER`,
|  | int | flags = `wxDATAVIEW_COL_RESIZABLE` |
| ) |  |  |

Constructs a text column.

Parameters:

  | title | The title of the column.
  | renderer | The class which will render the contents of this column.
  | model_column | The index of the model's column which is associated with this object.
  | width | The width of the column. The `wxDVC_DEFAULT_WIDTH` value is the fixed default value.
  | align | The alignment of the column title.
  | flags | One or more flags of the wxDataViewColumnFlags enumeration.

wxDataViewColumn::wxDataViewColumn | ( | const wxBitmap & | bitmap,
|  | wxDataViewRenderer * | renderer,
|  | unsigned int | model_column,
|  | int | width = `wxDVC_DEFAULT_WIDTH`,
|  | wxAlignment | align = `wxALIGN_CENTER`,
|  | int | flags = `wxDATAVIEW_COL_RESIZABLE` |
| ) |  |  |

Constructs a bitmap column.

Parameters:

  | bitmap | The bitmap of the column.
  | renderer | The class which will render the contents of this column.
  | model_column | The index of the model's column which is associated with this object.
  | width | The width of the column. The `wxDVC_DEFAULT_WIDTH` value is the fixed default value.
  | align | The alignment of the column title.
  | flags | One or more flags of the wxDataViewColumnFlags enumeration.

## Member Function Documentation

unsigned int wxDataViewColumn::GetModelColumn | ( |  | ) | const

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

wxDataViewCtrl* wxDataViewColumn::GetOwner | ( |  | ) | const

Returns the owning wxDataViewCtrl.

wxDataViewRenderer* wxDataViewColumn::GetRenderer | ( |  | ) | const

Returns the renderer of this wxDataViewColumn.

See also:
  wxDataViewRenderer.

|  | [ top ]