开发者

How to truncate a text in a custom GtkCellRenderer?

开发者 https://www.devze.com 2023-01-02 01:02 出处:网络
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:

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().

0

精彩评论

暂无评论...
验证码 换一张
取 消