Re: How to wrap text to next line automatically when using GtkCellRendererText?

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

 



Hi.
I think the only way of dynamically wrapping text is to monitor thetext view's width, calculate the appropriate width for cell rendererand set "wrap-width" property of cell renderer.
For monitoring the widget's dimensions you can connect handlers to"configure-event" or "size-allocate" signals.
Bye
2009/5/20 Zhihai Wang <pageguest@xxxxxxxxx>:> Dear all,>> I'm using GtkCellRendererText to render some text.> This text might be very long, and I want the text wrapped to next line(s)> according to the width of the window,> which means I can't set "wrap-width" property of GtkCellRendererText since> the width of the whole window might be resized by the user.>> I've tried for 2 days but still didn't work out:(> Could anyone give me some clue? Sample code is preferred.>> Thanks in advance.>> I also sent to gtk-app-devel-list@xxxxxxxxx, if you subscribed to both,> please kindly ignore this copy.>> --> Best Regards,>> Zhihai Wang>> _______________________________________________> gtk-list mailing list> gtk-list@xxxxxxxxx> http://mail.gnome.org/mailman/listinfo/gtk-list>>


-- Tadej Borovšak00386 (0)40 613 131tadeboro.blogspot.comtadeboro@xxxxxxxxxxxxxxxxxxxxxxx@gmail.com_______________________________________________gtk-list mailing listgtk-list@xxxxxxxxxxxxx://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