Re: enlarge the scrollable area



On Wed, Feb 16, 2011 at 1:49 AM, Stefano Facchini
<stefano facchini gmail com> wrote:
Hi,

I'm trying to build a scrolled window in a such a way that the child widget
has always the same size, regardless of the size of the scrolled window
itself. I tried gtk_scrolled_window_set_min_content_width, but this also
sets the minimum size of the scrolled window. Basically, I need something to
force the size of the child widget (for example a TextView), or to enlarge
the scrollable area without enlarging the scrolled window. Is it possible to
have this behavior?

Sounds like you should be able to get away with just
gtk_widget_set_size_request()
on the child textview, that should ensure the child text view always
receives at least
the size you set for it's minimum request without restricting the size
of the parent
scrolled window.

Note: In GTK+ 2.x setting the size request of the child widget was acting like
gtk_scrolled_window_set_min_content_width/height() as a sort of implied hidden
feature, in GTK+ 3.x you can choose to force the size of the scrolled window
by using the new api or just force the size of the child by using
gtk_widget_set_size_request().

Cheers,
          -Tristan



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