ScrolledWindow with TreeView is not behaving as expected

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ScrolledWindow with TreeView is not behaving as expected

Enrico Minack-2
Hi pygtk users,

I am facing an unexpected behavior of a Gtk.Window with a ScrolledWindow
containing a TreeView. The window always has minimal size. The behavior
that I desire would be that the Gtk.Window scales as the TreeStore /
TreeView grows until it reaches the limit of the screen. This happens
without the ScrolledWindow. With a ScrolledWindow, the scroll bars then
should appear when the TreeView does not fit the screen.

I attached demo code. The set_policy method does not lead to the desired
behavior.

I'd highly appreciate any hints how the resize behavior of the
ScrollWindow could be manipulated into the desired direction.

Kind regards,
Enrico Minack

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Bildschirmfoto-widget-window.py.png (3K) Download Attachment
widget-window.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ScrolledWindow with TreeView is not behaving as expected

Giuseppe Penone
Hi Enrico,
in my opinion the scrolledwindow behaves correctly.
The scrolledwindow just takes the size of his parent and can hold child
widgets of any dimension thanks to the scrollbars.
The scrolledwindow is not supposed to change size according to what you place inside.
Cheers,
Giuseppe.



On Sat, Jul 2, 2011 at 20:45, Enrico Minack <[hidden email]> wrote:
Hi pygtk users,

I am facing an unexpected behavior of a Gtk.Window with a ScrolledWindow
containing a TreeView. The window always has minimal size. The behavior
that I desire would be that the Gtk.Window scales as the TreeStore /
TreeView grows until it reaches the limit of the screen. This happens
without the ScrolledWindow. With a ScrolledWindow, the scroll bars then
should appear when the TreeView does not fit the screen.

I attached demo code. The set_policy method does not lead to the desired
behavior.

I'd highly appreciate any hints how the resize behavior of the
ScrollWindow could be manipulated into the desired direction.

Kind regards,
Enrico Minack

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: ScrolledWindow with TreeView is not behaving as expected

Pietro Battiston-2
Giuseppe Penone already answered correctly.

You find a workarounds (a bit old and possibly buggy) here:
http://www.pietrobattiston.it/wiki/pygtk:resizing

Also see this thread if you're interested on some discussion on the
issue:
http://www.daa.com.au/pipermail/pygtk/2009-August/017372.html


bye

Pietro

Il giorno lun, 04/07/2011 alle 10.41 +0200, Giuseppe Penone ha scritto:

> Hi Enrico,
> in my opinion the scrolledwindow behaves correctly.
> The scrolledwindow just takes the size of his parent and can hold
> child
> widgets of any dimension thanks to the scrollbars.
> The scrolledwindow is not supposed to change size according to what
> you place inside.
> Cheers,
> Giuseppe.
>
>
>
> On Sat, Jul 2, 2011 at 20:45, Enrico Minack <[hidden email]>
> wrote:
>         Hi pygtk users,
>        
>         I am facing an unexpected behavior of a Gtk.Window with a
>         ScrolledWindow
>         containing a TreeView. The window always has minimal size. The
>         behavior
>         that I desire would be that the Gtk.Window scales as the
>         TreeStore /
>         TreeView grows until it reaches the limit of the screen. This
>         happens
>         without the ScrolledWindow. With a ScrolledWindow, the scroll
>         bars then
>         should appear when the TreeView does not fit the screen.
>        
>         I attached demo code. The set_policy method does not lead to
>         the desired
>         behavior.
>        
>         I'd highly appreciate any hints how the resize behavior of the
>         ScrollWindow could be manipulated into the desired direction.
>        
>         Kind regards,
>         Enrico Minack
>        
>         _______________________________________________
>         pygtk mailing list   [hidden email]
>         http://www.daa.com.au/mailman/listinfo/pygtk
>         Read the PyGTK FAQ: http://faq.pygtk.org/
>
> _______________________________________________
> pygtk mailing list   [hidden email]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/