[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Help with Glade-3 and gtk.ScrolledWindow
- From: asomers gmail com
- To: Tadej Borovšak <tadeboro gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Help with Glade-3 and gtk.ScrolledWindow
- Date: Sun, 17 May 2009 11:25:36 -0600
It seems so obvious now that you point it out. I have no excuse for
not figuring that out on my own. Guess I'm just a n00b. Thanks for
the help.
-Alan
On Fri, May 15, 2009 at 3:55 PM, Tadej Borovšak <tadeboro gmail com> wrote:
> Hello.
>
> There are two kinds of widgets when it comes to adding them in
> scrolled window: those that support scrolling natively and those who
> don't.
>
> Widgets with native scrolling ability are only four: GtkTextView,
> GtkTreeView, GtkIconView and GtkViewport. Those widgets should be
> added to scrolled window using gtk_container_add function.
>
> All other widgets don't support scrolling, and this is why they need
> to be added inside GtkViewport prior being packed inside scrolled
> window. You can do that manually by creating viewport and packing it
> in scrolled window or use convenience function
> gtk_scrolled_window_add_with_viewport that does this for you.
>
> Hope this information helps a bit.
>
> Tadej
>
> 2009/5/12 <asomers gmail com>:
>> I'm trying to use a Scrolled Window in my application, but without
>> success. Using a TextView as the child widget works, but for any
>> other child widget I get the following error when I run the program:
>>
>> scrolled-win.py:17: GtkWarning: gtk_scrolled_window_add(): cannot add
>> non scrollable widget use gtk_scrolled_window_add_with_viewport()
>> instead
>> builder.add_from_file('scrolled-win.xml')
>>
>> Then the program appears but without any scroll bars.
>>
>> I've attached a test case. My system is:
>> Ubuntu 9.04 amd64
>> python 2.6.2
>> python-gtk2-dev 2.14.1-1ubuntu
>> glade-3 3.6.3
>>
>> Does anybody know what I'm doing wrong? Here is what I've tried already:
>> 1) Using a table of buttons, or a table of labels, or an image as the
>> child widget of the ScrolledWindow produces the same results
>> 2) Using a TextView as the child widget produces the desired result
>> 3) Using libglade instead of gtk.Builder produces the same results
>> 4) Saving the project in libglade format, then converting it with
>> gtk-builder-convert and loading it with gtk.Builder produces the same
>> results
>> 5) Running the example at
>> http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html
>> produces the same results, if I replace its TextView widget with a
>> table of buttons.
>> 6) Running the C example at that same website produces the same results.
>> 7) Running the scrolledwin.py example from python-gtk2-tutorial works.
>> This example does not use Glade in any way.
>>
>> -Alan Somers
>>
>> _______________________________________________
>> gtk-app-devel-list mailing list
>> gtk-app-devel-list gnome org
>> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>>
>
>
>
> --
> Tadej Borovšak
> tadeboro.blogspot.com
> tadeboro gmail com
> tadej borovsak gmail com
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]