gtktextarea w/wordwrap: how to shrink the width?



My application contains a GtkTable which holds a GtkTextArea.
I have the wrap on the textarea set to wordwrap.


When I expand the window (via the windowmanager) all is well.
(The text layout gets called, and the words roll up from later
lines to earlier ones as there is room on the prior lines.)

But when I go to shrink the window (via the windowmanager) the
app "refuses" to shrink the textarea in such a way that lines
would be broken in new places. (It will shrink so long as I am
only removing whitespace from the end of the longest line)

Putting the textarea in a scrolled window "solved" the problem
by letting the main window shrink, but then text was off the
scrolled area to the right, rather than getting laid out again,
using more vertical space to make up for the lost horizontal
space.


The text area is a status window. I would like it to resize
along with the rest of the table on the horizontal axis,
laying out the text using more vertical space as needed,
then add a vertical scrollbar when it's too big to fit.
(Scrollbar part is easy using a scrolled window)

It seems like I see text windows like this in a fair number
of applications, but I can't figure out how people are
doing it.

-Jeff Evarts




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