[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    [gtk-list] Re: questions on using text widget
From:       Chris Malek <cmalek () aves ! etho ! caltech ! edu>
Date:       1999-03-31 18:38:03
[Download RAW message or body]


Hi Adrian


> (2) I've created a scrolled window (with both horizontal and vertical
>     scrollbars set to display always) which contains the text
>     widget. The line wrap and word wrap of the text widget are set to
>     FALSE. If more lines are inserted into the text widget, the
>     vertical scrollbar is updated correctly. But if the line is long,
>     the line just get truncated (with an arrow at the end of line),
>     the size of the "slider" of the horizontal scrollbar does not get
>     updated and remains the same. Shouldn't the size of slider of the
>     horizontal scrollbar changed instead of the line getting
>     truncated? Is this a bug or there is something that I need to set?

I have come up against precisely this problem.  I think that the scrolled
window horizontal scrollbar only updates if the width of the contained
window changes, and long lines don't cause the width of the text widget
to change; the lines just get truncated to the width of the widget.

My solution (which I have not tried yet) is to manually resize the widget
to be wider than the longest line of text (using gdk_text_extents(),
perhaps to get the length of the line).  Perhaps there's a better way?

There will be a less kludgey way to do this when the text widget supports
horizontal scrollbars directly, perhaps.

Chris

--
Chris Malek, Sys. Admin.           cmalek@etho.caltech.edu
Division of Biology, 216-76
California Institute of Technology
Pasadena, CA  91125

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic