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

New in version 4.1/wxWidgets-3.1.4.


class_hierarchy Class Hierarchy

Inheritance diagram for class GridFitMode:

method_summary Methods Summary

__init__

Default constructor creates an object not specifying any behaviour.

Clip

Pseudo-constructor for object specifying clipping behaviour.

Ellipsize

Pseudo-constructor for object specifying ellipsize behaviour.

GetEllipsizeMode

Return ellipsize mode, possibly ELLIPSIZE_NONE .

IsClip

Return True if the object specifies clipping behaviour.

IsOverflow

Return True if the object specifies overflow behaviour.

IsSpecified

Return True if the object specifies some particular behaviour.

Overflow

Pseudo-constructor for object specifying overflow behaviour.


property_summary Properties Summary

EllipsizeMode

See GetEllipsizeMode


api Class API

class wx.grid.GridFitMode(object)

Possible constructors:

GridFitMode()

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 and Overflow below to create objects of this class instead.



static Clip()

Pseudo-constructor for object specifying clipping behaviour.

Return type

wx.grid.GridFitMode



static Ellipsize(ellipsize=ELLIPSIZE_END)

Pseudo-constructor for object specifying ellipsize behaviour.

Parameters

ellipsize (EllipsizeMode) –

Return type

wx.grid.GridFitMode



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

wx.EllipsizeMode



IsClip(self)

Return True if the object specifies clipping behaviour.

This method returns True only for the objects returned by Clip .

Return type

bool



IsOverflow(self)

Return True if the object specifies overflow behaviour.

This method returns True only for the objects returned by Overflow .

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

wx.grid.GridFitMode


Properties

EllipsizeMode

See GetEllipsizeMode