I trying to create custom GtkCellRenderer with some text. And I want this text truncated, when a size of GtkCellRenderer is smaller than size 开发者_如何学Goof text. For example:
alt text
How can I do this? Is this some property of CellRenderer or PangoLayout or I need to do this manually?
Use the ellipsize
and ellipsize-set
properties of GtkCellRendererText
.
If you want to do it manually with Pango, use pango_layout_set_ellipsize()
.
精彩评论