Class: Wx::GRID::GridFitMode
- Inherits:
-
Object
- Object
- Wx::GRID::GridFitMode
- Defined in:
- lib/wx/doc/gen/grid/grid_ctrl.rb
Overview
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
Class Method Summary collapse
-
.clip ⇒ Wx::GRID::GridFitMode
Pseudo-constructor for object specifying clipping behaviour.
-
.ellipsize(ellipsize = Wx::EllipsizeMode::ELLIPSIZE_END) ⇒ Wx::GRID::GridFitMode
Pseudo-constructor for object specifying ellipsize behaviour.
-
.overflow ⇒ Wx::GRID::GridFitMode
Pseudo-constructor for object specifying overflow behaviour.
Instance Method Summary collapse
-
#get_ellipsize_mode ⇒ Wx::EllipsizeMode
(also: #ellipsize_mode)
Return ellipsize mode, possibly EllipsizeMode::ELLIPSIZE_NONE.
-
#initialize ⇒ Wx::GRID::GridFitMode
constructor
Default constructor creates an object not specifying any behaviour.
-
#is_clip ⇒ Boolean
(also: #clip?)
Return true if the object specifies clipping behaviour.
-
#is_overflow ⇒ Boolean
(also: #overflow?)
Return true if the object specifies overflow behaviour.
-
#is_specified ⇒ Boolean
(also: #specified?)
Return true if the object specifies some particular behaviour.
Constructor Details
#initialize ⇒ Wx::GRID::GridFitMode
2818 |
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2818 def initialize; end |
Class Method Details
.clip ⇒ Wx::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.
2859 |
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2859 def self.ellipsize(ellipsize=Wx::EllipsizeMode::ELLIPSIZE_END) end |
.overflow ⇒ Wx::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_mode ⇒ Wx::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.
2845 |
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2845 def get_ellipsize_mode; end |
#is_clip ⇒ Boolean Also known as: clip?
Return true if the object specifies clipping behaviour.
This method returns true only for the objects returned by clip.
2831 |
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2831 def is_clip; end |
#is_overflow ⇒ Boolean Also known as: overflow?
Return true if the object specifies overflow behaviour.
This method returns true only for the objects returned by overflow.
2838 |
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2838 def is_overflow; end |
#is_specified ⇒ Boolean 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.
2824 |
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2824 def is_specified; end |