Rob Brown-Bayliss wrote:

>>That is weird.  Check the glade file to see if there is a GtkViewport 
>>between the TreeView and ScrolledWindow.  If so, that could be the cause 
>>of the problem.  If there is, then the GtkViewport will be handling the 
>>scrolling, and the TreeView won't handle things correctly (as far as it 
>>is concerned, it will have been given enough space to display all the rows).
>>    
>>
>
>That was it...  What is a vieport and why would you use one?
>  
>
You are only allowed to place widgets that know how to scroll themselves 
into a GtkScrolledWindow.  When you add the widget to the swin, the 
hadjustment and vadjustment will be set, so that the scrollbars control 
the widget.  The widget may want to handle scrolling specially, like the 
tree view does (make sure headers always visible).

However, you may want to insert some widget that doesn't know how to 
scroll itself (such as a box full of buttons).  In this case, you use a 
GtkViewport.

The viewport is just one GdkWindow packed inside another.  The inner 
window is expanded to the requested size of the viewport's child (which 
may be larger than the containing GdkWindow.  To scroll, it just 
repositions the inner GdkWindow, which scrolls the child.

So if you have a viewport between the scrolledwindow and the tree view, 
the tree view won't be able to scroll itself (the viewport will perform 
the scrolling).

James.

-- 
Email: [EMAIL PROTECTED]              | Linux.conf.au 2003 Call for Papers out
WWW:   http://www.daa.com.au/~james/ |   http://conf.linux.org.au/cfp.html




_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to