Re: [gtkmm] TextView resizing



Hi,

* Barnaby Gray <bee pickle me uk> [2002-12-28 16:10:15]:
> On Sat, Dec 28, 2002 at 02:40:34PM +0100, Morten Brix Pedersen wrote:
> > However, wrapping on characters isn't always the prettiest solution, so
> > I'm quite annoyed with the behaviour you describe as well.
> 
> Maybe it's expected behaviour, but I agree with you it's crap - there
> seems no way of achieving the standard way of wrapping in writing,
> ie. wrap by word, hyphenate (or even just break) words that are too
> long to wrap. Too bad for gtk they decided not to implement this.

There seems to be hope out there anyway.

I just noticed that Pango 1.2 adds a third wrap method, that is
PANGO_WRAP_WORD_CHAR:
http://developer.gnome.org/doc/API/2.0/pango/pango-Layout-Objects.html#PangoWrapMode

Unfortunately, it seems that the GTK+ folks have forgotten to add this
to their own enum to use in TextView::set_wrap_mode(), but I'll report a
bug against that in a moment.

But anyway - you should be able to do the following still:

_textview.get_layout().set_wrap_mode(Pango::WRAP_WORD_CHAR);

Hope that helps,

  - Morten.




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