Adds methods to set the column attributes to wx.HeaderColumn.
This class adds setters for the column attributes defined by wx.HeaderColumn. It is still an abstract base class and needs to be implemented before using it with wx.HeaderCtrl.
wx.dataview.DataViewColumn, wx.HeaderColumnSimple
Set or clear the given flag. |
|
Clear the specified flag for the column. |
|
Set the alignment of the column header. |
|
Set the bitmap to be displayed in the column header. |
|
Set the specified flag for the column. |
|
Set the column flags. |
|
Hide or show the column. |
|
Set the minimal column width. |
|
Allow changing the column order by dragging it. |
|
Call this to enable or disable interactive resizing of the column by the user. |
|
Sets this column as the sort key for the associated control. |
|
Allow clicking the column to sort the control contents by the field in this column. |
|
Set the text to display in the column header. |
|
Set the column width. |
|
Toggle the specified flag for the column. |
|
Inverses the sort order. |
|
Don’t use this column for sorting. |
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Adds methods to set the column attributes to HeaderColumn.
Set or clear the given flag.
None
See also
Clear the specified flag for the column.
flag (int)
None
See also
Set the alignment of the column header.
align (Alignment) – The text alignment in horizontal direction only or wx.ALIGN_NOT
to use the default alignment, The possible values here are wx.ALIGN_CENTRE
, wx.ALIGN_LEFT
or wx.ALIGN_RIGHT
with wx.ALIGN_CENTRE_HORIZONTAL
being also supported as synonym for wx.ALIGN_CENTRE
for consistency (but notice that GetAlignment
never returns it).
None
Set the bitmap to be displayed in the column header.
Notice that the bitmaps displayed in different columns of the same control must all be of the same size.
bitmap (wx.BitmapBundle)
None
Set the specified flag for the column.
flag (int)
None
See also
Set the column flags.
This method allows setting all flags at once, see also generic ChangeFlag
, SetFlag
, ClearFlag
and ToggleFlag
methods below as well as specific SetResizeable
, SetSortable
, SetReorderable
and SetHidden
ones.
flags (int) – Combination of wx.COL_RESIZABLE
, wx.COL_SORTABLE
, wx.COL_REORDERABLE
and wx.COL_HIDDEN
bit flags.
None
Hide or show the column.
By default all columns are shown but some of them can be completely hidden from view by calling this function.
Equivalent to ChangeFlag(wxCOL_HIDDEN, hidden).
hidden (bool)
None
Set the minimal column width.
This method can be used with resizable columns (i.e. those for which wx.COL_RESIZABLE
flag is set in GetFlags
or, alternatively, IsResizeable
returns True
) to prevent the user from making them narrower than the given width.
minWidth (int) – The minimal column width in pixels, may be 0 to remove any previously set restrictions.
None
Allow changing the column order by dragging it.
Equivalent to ChangeFlag(wxCOL_REORDERABLE, reorderable).
reorderable (bool)
None
Call this to enable or disable interactive resizing of the column by the user.
By default, the columns are resizable.
Equivalent to ChangeFlag(wxCOL_RESIZABLE, resizable).
resizable (bool)
None
Sets this column as the sort key for the associated control.
This function indicates that this column is currently used for sorting the control and also sets the sorting direction. Notice that actual sorting is only done in the control associated with the header, this function doesn’t do any sorting on its own.
Don’t confuse this function with SetSortable
which should be used to indicate that the column may be used for sorting while this one is used to indicate that it currently is used for sorting. Of course, SetSortOrder
can be only called for sortable columns.
ascending (bool) – If True
, sort in ascending order, otherwise in descending order.
None
Allow clicking the column to sort the control contents by the field in this column.
By default, the columns are not sortable so you need to explicitly call this function to allow sorting by the field corresponding to this column.
Equivalent to ChangeFlag(wxCOL_SORTABLE, sortable).
sortable (bool)
None
Set the text to display in the column header.
title (string)
None
Set the column width.
width (int) – The column width in pixels or the special wx.COL_WIDTH_DEFAULT
(meaning to use default width) or wx.COL_WIDTH_AUTOSIZE
(size to fit the content) value.
None
Toggle the specified flag for the column.
If the flag is currently set, equivalent to ClearFlag
, otherwise – to SetFlag
.
flag (int)
None
See also
Inverses the sort order.
This function is typically called when the user clicks on a column used for sorting to change sort order from ascending to descending or vice versa.
None
See also
Don’t use this column for sorting.
This is the reverse of SetSortOrder
and is called to indicate that this column is not used for sorting any longer.
None
See GetAlignment
and SetAlignment
See GetMinWidth
and SetMinWidth
See IsReorderable
and SetReorderable
See IsResizeable
and SetResizeable
See IsSortable
and SetSortable