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.
New in version 4.1/wxWidgets-3.1.4.
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. |
See |
wx.grid.
GridFitMode
(object)¶Possible constructors:
GridFitMode()
Allows to specify the behaviour when the cell contents doesn’t fit into its allotted space.
__init__
(self)¶Default constructor creates an object not specifying any behaviour.
This constructor is not very useful, use static methods Clip
and Overflow
below to create objects of this class instead.
Clip
()¶Pseudo-constructor for object specifying clipping behaviour.
Ellipsize
(ellipsize=ELLIPSIZE_END)¶Pseudo-constructor for object specifying ellipsize behaviour.
ellipsize (EllipsizeMode) –
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.
IsClip
(self)¶Return True
if the object specifies clipping behaviour.
This method returns True
only for the objects returned by Clip
.
bool
IsOverflow
(self)¶Return True
if the object specifies overflow behaviour.
This method returns True
only for the objects returned by Overflow
.
bool
IsSpecified
(self)¶Return True
if the object specifies some particular behaviour.
This method returns False
for default-constructed objects of this type only.
bool
Overflow
()¶Pseudo-constructor for object specifying overflow behaviour.
EllipsizeMode
¶See GetEllipsizeMode