| Version: 3.3.1

Public Member Functions | Static Public Member Functions | List of all members
wxGridFitMode Class Reference
Class List by Category » Grid Related Classes

`#include <wx/grid.h>`

## Detailed Description

Allows to specify the behaviour when the cell contents doesn't fit into its allotted space.

Objects of this class are used with wxGridCellAttr::SetFitMode() and wxGrid::SetDefaultCellFitMode() and wxGrid::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 (``...), putting the ellipsis at the end by default, but possibly at the beginning or in the middle.

The default behaviour is to overflow, use wxGrid::SetDefaultCellFitMode() to change this, for example:

grid->SetDefaultCellFitMode(wxGridFitMode::Clip());
wxGridFitMode::Clip
static wxGridFitMode Clip()
Pseudo-constructor for object specifying clipping behaviour.

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.

##

Library: wxCore
Category: Grid Related Classes

Since
  3.1.4

## Public Member Functions
| wxGridFitMode ()
| Default constructor creates an object not specifying any behaviour. More...
bool | IsSpecified () const
| Return true if the object specifies some particular behaviour. More...
bool | IsClip () const
| Return true if the object specifies clipping behaviour. More...
bool | IsOverflow () const
| Return true if the object specifies overflow behaviour. More...
wxEllipsizeMode | GetEllipsizeMode () const
| Return ellipsize mode, possibly `wxELLIPSIZE_NONE`. More...

## Static Public Member Functions
static wxGridFitMode | Clip ()
| Pseudo-constructor for object specifying clipping behaviour. More...
static wxGridFitMode | Overflow ()
| Pseudo-constructor for object specifying overflow behaviour. More...
static wxGridFitMode | Ellipsize (wxEllipsizeMode ellipsize=wxELLIPSIZE_END)
| Pseudo-constructor for object specifying ellipsize behaviour. More...

## Constructor & Destructor Documentation

## ◆ wxGridFitMode()

wxGridFitMode::wxGridFitMode | ( |  | ) |

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.

## Member Function Documentation

## ◆ Clip()

static wxGridFitMode wxGridFitMode::Clip | ( |  | ) |
| static

Pseudo-constructor for object specifying clipping behaviour.

## ◆ Ellipsize()

static wxGridFitMode wxGridFitMode::Ellipsize | ( | wxEllipsizeMode | ellipsize = `wxELLIPSIZE_END` | ) |
| static

Pseudo-constructor for object specifying ellipsize behaviour.

## ◆ GetEllipsizeMode()

wxEllipsizeMode wxGridFitMode::GetEllipsizeMode | ( |  | ) | const

Return ellipsize mode, possibly `wxELLIPSIZE_NONE`.

For the objects constructed using Ellipsize(), the same ellipsization mode as was passed to it is returned. For all the other objects, wxELLIPSIZE_NONE is.

## ◆ IsClip()

bool wxGridFitMode::IsClip | ( |  | ) | const

Return true if the object specifies clipping behaviour.

This method returns true only for the objects returned by Clip().

## ◆ IsOverflow()

bool wxGridFitMode::IsOverflow | ( |  | ) | const

Return true if the object specifies overflow behaviour.

This method returns true only for the objects returned by Overflow().

## ◆ IsSpecified()

bool wxGridFitMode::IsSpecified | ( |  | ) | const

Return true if the object specifies some particular behaviour.

This method returns false for default-constructed objects of this type only.

## ◆ Overflow()

static wxGridFitMode wxGridFitMode::Overflow | ( |  | ) |
| static

Pseudo-constructor for object specifying overflow behaviour.