Adds methods to set the column attributes to HeaderColumn.
This class adds setters for the column attributes defined by HeaderColumn. It is still an abstract base class and needs to be implemented before using it with HeaderCtrl.
ChangeFlag | Set or clear the given flag. |
ClearFlag | Clear the specified flag for the column. |
SetAlignment | Set the alignment of the column header. |
SetBitmap | Set the bitmap to be displayed in the column header. |
SetFlag | Set the specified flag for the column. |
SetFlags | Set the column flags. |
SetHidden | Hide or show the column. |
SetMinWidth | Set the minimal column width. |
SetReorderable | Allow changing the column order by dragging it. |
SetResizeable | Call this to enable or disable interactive resizing of the column by the user. |
SetSortOrder | Sets this column as the sort key for the associated control. |
SetSortable | Allow clicking the column to sort the control contents by the field in this column. |
SetTitle | Set the text to display in the column header. |
SetWidth | Set the column width. |
ToggleFlag | Toggle the specified flag for the column. |
ToggleSortOrder | Inverses the sort order. |
UnsetAsSortKey | Don’t use this column for sorting. |
Alignment | See GetAlignment and SetAlignment |
Bitmap | See GetBitmap and SetBitmap |
Flags | See GetFlags and SetFlags |
Hidden | See IsHidden and SetHidden |
MinWidth | See GetMinWidth and SetMinWidth |
Reorderable | See IsReorderable and SetReorderable |
Resizeable | See IsResizeable and SetResizeable |
Sortable | See IsSortable and SetSortable |
Title | See GetTitle and SetTitle |
Width | See GetWidth and SetWidth |
Adds methods to set the column attributes to HeaderColumn.
Set or clear the given flag.
Parameters: |
---|
See also
Clear the specified flag for the column.
Parameters: | flag (int) – |
---|
See also
Set the alignment of the column header.
Parameters: | align (Alignment) – The text alignment in horizontal direction only or ALIGN_NOT to use the default alignment, The possible values here are ALIGN_CENTRE, ALIGN_LEFT or ALIGN_RIGHT with ALIGN_CENTRE_HORIZONTAL being also supported as synonym for ALIGN_CENTRE for consistency (but notice that GetAlignment never returns it). |
---|
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.
Parameters: | bitmap (Bitmap) – |
---|
Set the specified flag for the column.
Parameters: | flag (int) – |
---|
See also
Set the column flags.
This method allows to set all flags at once, see also generic ChangeFlag , SetFlag , ClearFlag and ToggleFlag methods below as well as specific SetResizeable , SetSortable , SetReorderable and SetHidden ones.
Parameters: | flags (int) – Combination of COL_RESIZABLE, COL_SORTABLE, COL_REORDERABLE and COL_HIDDEN bit flags. |
---|
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).
Parameters: | hidden (bool) – |
---|
Set the minimal column width.
This method can be used with resizable columns (i.e. those for which COL_RESIZABLE flag is set in GetFlags or, alternatively, IsResizeable returns True) to prevent the user from making them narrower than the given width.
Parameters: | minWidth (int) – The minimal column width in pixels, may be 0 to remove any previously set restrictions. |
---|
Allow changing the column order by dragging it.
Equivalent to ChangeFlag(wxCOL_REORDERABLE, reorderable).
Parameters: | reorderable (bool) – |
---|
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).
Parameters: | resizable (bool) – |
---|
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.
Parameters: | ascending (bool) – If True, sort in ascending order, otherwise in descending order. |
---|
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).
Parameters: | sortable (bool) – |
---|
Set the text to display in the column header.
Parameters: | title (string) – |
---|
Set the column width.
Parameters: | width (int) – The column width in pixels or the special COL_WIDTH_DEFAULT (meaning to use default width) or COL_WIDTH_AUTOSIZE (size to fit the content) value. |
---|
Toggle the specified flag for the column.
If the flag is currently set, equivalent to ClearFlag , otherwise – to SetFlag .
Parameters: | flag (int) – |
---|
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.
See also
SetSortOrder , IsSortOrderAscending
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.
See GetAlignment and SetAlignment
See GetMinWidth and SetMinWidth
See IsReorderable and SetReorderable
See IsResizeable and SetResizeable
See IsSortable and SetSortable