phoenix_title wx.SettableHeaderColumn

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.


class_hierarchy Class Hierarchy

Inheritance diagram for class SettableHeaderColumn:

method_summary Methods Summary

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.


property_summary Properties Summary

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


api Class API

class wx.SettableHeaderColumn(HeaderColumn)

Adds methods to set the column attributes to HeaderColumn.


Methods

ChangeFlag(self, flag, set)

Set or clear the given flag.

Parameters
  • flag (int) – The flag to set or clear.

  • set (bool) – If True, set the flag, i.e. equivalent to calling SetFlag , otherwise clear it, as ClearFlag .

See also

SetFlags



ClearFlag(self, flag)

Clear the specified flag for the column.

Parameters

flag (int) –

See also

SetFlags



SetAlignment(self, align)

Set the alignment of the column header.

Parameters

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).



SetBitmap(self, bitmap)

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 (wx.BitmapBundle) –



SetFlag(self, flag)

Set the specified flag for the column.

Parameters

flag (int) –

See also

SetFlags



SetFlags(self, flags)

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.

Parameters

flags (int) – Combination of wx.COL_RESIZABLE, wx.COL_SORTABLE, wx.COL_REORDERABLE and wx.COL_HIDDEN bit flags.



SetHidden(self, hidden)

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) –



SetMinWidth(self, minWidth)

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.

Parameters

minWidth (int) – The minimal column width in pixels, may be 0 to remove any previously set restrictions.



SetReorderable(self, reorderable)

Allow changing the column order by dragging it.

Equivalent to ChangeFlag(wxCOL_REORDERABLE, reorderable).

Parameters

reorderable (bool) –



SetResizeable(self, resizable)

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) –



SetSortOrder(self, ascending)

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.



SetSortable(self, sortable)

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) –



SetTitle(self, title)

Set the text to display in the column header.

Parameters

title (string) –



SetWidth(self, width)

Set the column width.

Parameters

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.



ToggleFlag(self, flag)

Toggle the specified flag for the column.

If the flag is currently set, equivalent to ClearFlag , otherwise – to SetFlag .

Parameters

flag (int) –

See also

SetFlags



ToggleSortOrder(self)

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.



UnsetAsSortKey(self)

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.


Properties

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