wx.grid.GridFitMode¶
Allows to specify the behaviour when the cell contents doesn’t fit into its allotted space.
Objects of this class are used with wx.grid.GridCellAttr.SetFitMode
and wx.grid.Grid.SetDefaultCellFitMode
and wx.grid.Grid.SetCellFitMode
functions and allow to specify what should happen if the cell contents doesn’t fit into the available space. The possibilities are:
Overflow into the cell to the right if it is empty, or possibly several cells, if the cell contents still doesn’t fit after overflowing into the immediately neighbouring cell.
Clip the cell contents, discarding the part which doesn’t fit.
Ellipsize the cell contents, i.e. replace the non-fitting part with ellipsis (
The default behaviour is to overflow, use wx.grid.Grid.SetDefaultCellFitMode
to change this, for example:
grid.SetDefaultCellFitMode(wx.grid.GridFitMode.Clip())
Objects of this class are created using static functions instead of constructors for better readability and can’t be changed after creating them except by using the assignment operator.
Added in version 4.1/wxWidgets-3.1.4.
Class Hierarchy¶
Methods Summary¶
Default constructor creates an object not specifying any behaviour. |
|
Pseudo-constructor for object specifying clipping behaviour. |
|
Pseudo-constructor for object specifying ellipsize behaviour. |
|
Return ellipsize mode, possibly |
|
Return |
|
Return |
|
Return |
|
Pseudo-constructor for object specifying overflow behaviour. |
Properties Summary¶
See |
Class API¶
- class wx.grid.GridFitMode(object)¶
Possible constructors:
GridFitMode() -> None
Allows to specify the behaviour when the cell contents doesn’t fit into its allotted space.
Methods¶
- __init__(self)¶
Default constructor creates an object not specifying any behaviour.
This constructor is not very useful, use static methods
Clip
andOverflow
below to create objects of this class instead.- Return type:
None
- static Clip()¶
Pseudo-constructor for object specifying clipping behaviour.
- Return type:
- static Ellipsize(ellipsize=ELLIPSIZE_END)¶
Pseudo-constructor for object specifying ellipsize behaviour.
- Parameters:
ellipsize (EllipsizeMode)
- Return type:
- GetEllipsizeMode(self)¶
Return ellipsize mode, possibly
ELLIPSIZE_NONE
.For the objects constructed using
Ellipsize
, the same ellipsization mode as was passed to it is returned. For all the other objects,ELLIPSIZE_NONE
is.- Return type:
- IsClip(self)¶
Return
True
if the object specifies clipping behaviour.This method returns
True
only for the objects returned byClip
.- Return type:
bool
- IsOverflow(self)¶
Return
True
if the object specifies overflow behaviour.This method returns
True
only for the objects returned byOverflow
.- Return type:
bool
- IsSpecified(self)¶
Return
True
if the object specifies some particular behaviour.This method returns
False
for default-constructed objects of this type only.- Return type:
bool
- static Overflow()¶
Pseudo-constructor for object specifying overflow behaviour.
- Return type:
Properties¶
- EllipsizeMode¶
See
GetEllipsizeMode