Gtk.CellRendererText¶
- Subclasses:
Gtk.CellRendererAccel
,Gtk.CellRendererCombo
,Gtk.CellRendererSpin
Methods¶
- Inherited:
- Structs:
class |
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
|||
r/w/en |
|||
r/w |
|||
w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w/en |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
w |
|||
r/w/en |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w/en |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted after renderer has been edited. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Gtk.CellRendererText(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Renders text in a cell
A
GtkCellRendererText
renders a given text in its cell, using the font, color and style information provided by its properties. The text will be ellipsized if it is too long and theGtkCellRendererText:ellipsize
property allows it.If the
GtkCellRenderer:mode
isGtk.CellRendererMode.EDITABLE
, theGtkCellRendererText
allows to edit its text using an entry.Deprecated since version 4.10: List views use widgets to display their contents. You should use [class`Gtk`.Inscription] or [class`Gtk`.Label] instead
- classmethod new()[source]¶
- Returns:
the new cell renderer
- Return type:
Creates a new
GtkCellRendererText
. Adjust how text is drawn using object properties. Object properties can be set globally (with g_object_set()). Also, withGtkTreeViewColumn
, you can bind a property to a value in aGtkTreeModel
. For example, you can bind the “text” property on the cell renderer to a string value in the model, thus rendering a different string in each row of theGtkTreeView
.Deprecated since version 4.10.
- set_fixed_height_from_font(number_of_rows)[source]¶
- Parameters:
number_of_rows (
int
) – Number of rows of text each cell renderer is allocated, or -1
Sets the height of a renderer to explicitly be determined by the “font” and “y_pad” property set on it. Further changes in these properties do not affect the height, so they must be accompanied by a subsequent call to this function. Using this function is inflexible, and should really only be used if calculating the size of a cell is too slow (ie, a massive number of cells displayed). If number_of_rows is -1, then the fixed height is unset, and the height is determined by the properties again.
Deprecated since version 4.10.
Signal Details¶
- Gtk.CellRendererText.signals.edited(cell_renderer_text, path, new_text)¶
- Signal Name:
edited
- Flags:
- Parameters:
cell_renderer_text (
Gtk.CellRendererText
) – The object which received the signalpath (
str
) – the path identifying the edited cellnew_text (
str
) – the new text
This signal is emitted after renderer has been edited.
It is the responsibility of the application to update the model and store new_text at the position indicated by path.
Property Details¶
- Gtk.CellRendererText.props.align_set¶
- Gtk.CellRendererText.props.alignment¶
- Name:
alignment
- Type:
- Default Value:
- Flags:
Specifies how to align the lines of text with respect to each other.
Note that this property describes how to align the lines of text in case there are several of them. The “xalign” property of
GtkCellRenderer
, on the other hand, sets the horizontal alignment of the whole text.
- Gtk.CellRendererText.props.attributes¶
- Name:
attributes
- Type:
- Default Value:
- Flags:
- Gtk.CellRendererText.props.background¶
- Gtk.CellRendererText.props.background_rgba¶
-
Background color as a
GdkRGBA
- Gtk.CellRendererText.props.background_set¶
- Gtk.CellRendererText.props.editable¶
- Gtk.CellRendererText.props.editable_set¶
- Gtk.CellRendererText.props.ellipsize¶
- Name:
ellipsize
- Type:
- Default Value:
- Flags:
Specifies the preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string. Setting it to
Pango.EllipsizeMode.NONE
turns off ellipsizing. See the wrap-width property for another way of making the text fit into a given width.
- Gtk.CellRendererText.props.ellipsize_set¶
- Gtk.CellRendererText.props.family¶
- Gtk.CellRendererText.props.family_set¶
- Gtk.CellRendererText.props.font_desc¶
- Name:
font-desc
- Type:
- Default Value:
- Flags:
- Gtk.CellRendererText.props.foreground¶
- Gtk.CellRendererText.props.foreground_rgba¶
-
Foreground color as a
GdkRGBA
- Gtk.CellRendererText.props.foreground_set¶
- Gtk.CellRendererText.props.language¶
- Gtk.CellRendererText.props.language_set¶
- Gtk.CellRendererText.props.max_width_chars¶
- Name:
max-width-chars
- Type:
- Default Value:
-1
- Flags:
The desired maximum width of the cell, in characters. If this property is set to -1, the width will be calculated automatically.
For cell renderers that ellipsize or wrap text; this property controls the maximum reported width of the cell. The cell should not receive any greater allocation unless it is set to expand in its
GtkCellLayout
and all of the cell’s siblings have received their natural width.
- Gtk.CellRendererText.props.placeholder_text¶
-
The text that will be displayed in the
GtkCellRenderer
ifGtkCellRendererText:editable
isTrue
and the cell is empty.
- Gtk.CellRendererText.props.rise_set¶
- Gtk.CellRendererText.props.scale¶
- Gtk.CellRendererText.props.scale_set¶
- Gtk.CellRendererText.props.single_paragraph_mode¶
- Name:
single-paragraph-mode
- Type:
- Default Value:
- Flags:
- Gtk.CellRendererText.props.size_points¶
- Gtk.CellRendererText.props.size_set¶
- Gtk.CellRendererText.props.stretch¶
- Name:
stretch
- Type:
- Default Value:
- Flags:
- Gtk.CellRendererText.props.stretch_set¶
- Gtk.CellRendererText.props.strikethrough¶
- Gtk.CellRendererText.props.strikethrough_set¶
- Gtk.CellRendererText.props.style¶
- Name:
style
- Type:
- Default Value:
- Flags:
- Gtk.CellRendererText.props.style_set¶
- Gtk.CellRendererText.props.underline¶
- Name:
underline
- Type:
- Default Value:
- Flags:
- Gtk.CellRendererText.props.underline_set¶
- Gtk.CellRendererText.props.variant¶
- Name:
variant
- Type:
- Default Value:
- Flags:
- Gtk.CellRendererText.props.variant_set¶
- Gtk.CellRendererText.props.weight¶
- Gtk.CellRendererText.props.weight_set¶
- Gtk.CellRendererText.props.width_chars¶
- Name:
width-chars
- Type:
- Default Value:
-1
- Flags:
The desired width of the cell, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the cell will request either 3 characters or the property value, whichever is greater.
- Gtk.CellRendererText.props.wrap_mode¶
- Name:
wrap-mode
- Type:
- Default Value:
- Flags:
Specifies how to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string. This property has no effect unless the wrap-width property is set.
- Gtk.CellRendererText.props.wrap_width¶
- Name:
wrap-width
- Type:
- Default Value:
-1
- Flags:
Specifies the minimum width at which the text is wrapped. The wrap-mode property can be used to influence at what character positions the line breaks can be placed. Setting wrap-width to -1 turns wrapping off.