wx.dataview.DataViewColumn¶
This class represents a column in a wx.dataview.DataViewCtrl.
One wx.dataview.DataViewColumn is bound to one column in the data model to which the wx.dataview.DataViewCtrl has been associated.
An instance of wx.dataview.DataViewRenderer is used by this class to render its data.
Note
In wxGTK, setting the width of the column doesn’t happen immediately when SetWidth
is called, but only slightly later and GetWidth
will return the old width (0 initially) until this happens. If the column widths are set before wx.dataview.DataViewCtrl is initially shown, they will only be effectively set when it becomes visible.
Class Hierarchy¶
Methods Summary¶
Constructs a text column. |
|
Returns the index of the column of the model, which this wx.dataview.DataViewColumn is displaying. |
|
Returns the owning wx.dataview.DataViewCtrl. |
|
Returns the renderer of this wx.dataview.DataViewColumn. |
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.dataview.DataViewColumn(SettableHeaderColumn)¶
Possible constructors:
DataViewColumn(title, renderer, model_column, width=DVC_DEFAULT_WIDTH, align=ALIGN_CENTER, flags=DATAVIEW_COL_RESIZABLE) -> None DataViewColumn(bitmap, renderer, model_column, width=DVC_DEFAULT_WIDTH, align=ALIGN_CENTER, flags=DATAVIEW_COL_RESIZABLE) -> None
This class represents a column in a DataViewCtrl.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self, title, renderer, model_column, width=DVC_DEFAULT_WIDTH, align=ALIGN_CENTER, flags=DATAVIEW_COL_RESIZABLE)
Constructs a text column.
- Parameters:
title (string) – The title of the column.
renderer (wx.dataview.DataViewRenderer) – The class which will render the contents of this column.
model_column (int) – The index of the model’s column which is associated with this object.
width (int) – The width of the column. The
DVC_DEFAULT_WIDTH
value is the fixed default value. You can also useCOL_WIDTH_DEFAULT
orCOL_WIDTH_AUTOSIZE
.align (Alignment) – The alignment of the column title.
flags (int) – One or more flags of the wx.dataview.DataViewColumnFlags enumeration.
- Return type:
None
__init__ (self, bitmap, renderer, model_column, width=DVC_DEFAULT_WIDTH, align=ALIGN_CENTER, flags=DATAVIEW_COL_RESIZABLE)
Constructs a bitmap column.
- Parameters:
bitmap (wx.BitmapBundle) – The bitmap of the column.
renderer (wx.dataview.DataViewRenderer) – The class which will render the contents of this column.
model_column (int) – The index of the model’s column which is associated with this object.
width (int) – The width of the column. The
DVC_DEFAULT_WIDTH
value is the fixed default value. You can also useCOL_WIDTH_DEFAULT
orCOL_WIDTH_AUTOSIZE
.align (Alignment) – The alignment of the column title.
flags (int) – One or more flags of the wx.dataview.DataViewColumnFlags enumeration.
- Return type:
None
- GetModelColumn(self)¶
Returns the index of the column of the model, which this wx.dataview.DataViewColumn is displaying.
- Return type:
int
- GetOwner(self)¶
Returns the owning wx.dataview.DataViewCtrl.
- Return type:
- GetRenderer(self)¶
Returns the renderer of this wx.dataview.DataViewColumn.
- Return type:
See also
Properties¶
- Alignment¶
See
GetAlignment
andSetAlignment
- MinWidth¶
See
GetMinWidth
andSetMinWidth
- ModelColumn¶
See
GetModelColumn
- Renderer¶
See
GetRenderer
- SortOrder¶
See
IsSortOrderAscending
andSetSortOrder