Class: Wx::GRID::GridFitMode

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/grid/grid_ctrl.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

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#set_fit_mode and Wx::GRID::Grid#set_default_cell_fit_mode and Wx::GRID::Grid#set_cell_fit_mode 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 Wx::GRID::Grid#set_default_cell_fit_mode to change this, for example:

grid.set_default_cell_fit_mode(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.

Category: Grid Related Classes

Requires:

  • USE_GRID

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWx::GRID::GridFitMode

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.



2818
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2818

def initialize; end

Class Method Details

.clipWx::GRID::GridFitMode

Pseudo-constructor for object specifying clipping behaviour.



2850
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2850

def self.clip; end

.ellipsize(ellipsize = Wx::EllipsizeMode::ELLIPSIZE_END) ⇒ Wx::GRID::GridFitMode

Pseudo-constructor for object specifying ellipsize behaviour.

Parameters:

Returns:



2859
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2859

def self.ellipsize(ellipsize=Wx::EllipsizeMode::ELLIPSIZE_END) end

.overflowWx::GRID::GridFitMode

Pseudo-constructor for object specifying overflow behaviour.



2854
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2854

def self.overflow; end

Instance Method Details

#get_ellipsize_modeWx::EllipsizeMode Also known as: ellipsize_mode

Return ellipsize mode, possibly EllipsizeMode::ELLIPSIZE_NONE.

For the objects constructed using ellipsize, the same ellipsization mode as was passed to it is returned. For all the other objects, EllipsizeMode::ELLIPSIZE_NONE is.

Returns:



2845
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2845

def get_ellipsize_mode; end

#is_clipBoolean Also known as: clip?

Return true if the object specifies clipping behaviour.

This method returns true only for the objects returned by clip.

Returns:

  • (Boolean)


2831
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2831

def is_clip; end

#is_overflowBoolean Also known as: overflow?

Return true if the object specifies overflow behaviour.

This method returns true only for the objects returned by overflow.

Returns:

  • (Boolean)


2838
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2838

def is_overflow; end

#is_specifiedBoolean Also known as: specified?

Return true if the object specifies some particular behaviour.

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

Returns:

  • (Boolean)


2824
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2824

def is_specified; end