Re: GtkCellRendererText wrap with ellipsize and sizing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wesley Smith <wesley.hoke@xxxxxxxxx>

> Is there a way to have both wrapping and ellipses when rendering a
> GtkCellRendererText?  I want the cell to wrap the text for up to 2
> lines and afterward show ellipses.  Also, how can I get a callback
> when the GtkCellRendererText is resized in order to properly adapt the
> GtkCellRendererText wrap-width attribute?

One way is set the ellipsize mode and just add a newline character on
your text (ie: '\n'). The problem with this solution is that you need
to compute the break point to do that.

Also, with this solution you don't need of take care of the wrap-width
attribute, as you are the one wrapping the line.

===
API (apinheiro@xxxxxxxxxx)
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux