Re: [pygtk] treview headers
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/
Re: [pygtk] treview headers
> 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? -- * * Rob Brown-Bayliss * ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] treview headers
Rob Brown-Bayliss wrote: >On Fri, 2002-08-02 at 16:21, James Henstridge wrote: > > >>Haven't run into any of these problems myself. >> >>Is the treeview packed inside a gtk.ScrolledWindow? If not, try doing >>that. The tree view should handle scrolling correctly in that case. >> >>swin = gtk.ScrolledWindow() >>swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) >>swin.add(treeview) >> >> > >I am useing glade, the treeview is inside ascrolled window, the scroll >bars are on automatic, in that they only appear when needed, but as soon >as I scroll down the column headers scroll out the top of teh scrolled >window, and it's not scrolling with hte keyboard... > >bugger really as the headings do serve a usefull purpose... > > 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). 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/
Re: [pygtk] treview headers
On Fri, 2002-08-02 at 16:21, James Henstridge wrote: > Haven't run into any of these problems myself. > > Is the treeview packed inside a gtk.ScrolledWindow? If not, try doing > that. The tree view should handle scrolling correctly in that case. > > swin = gtk.ScrolledWindow() > swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) > swin.add(treeview) I am useing glade, the treeview is inside ascrolled window, the scroll bars are on automatic, in that they only appear when needed, but as soon as I scroll down the column headers scroll out the top of teh scrolled window, and it's not scrolling with hte keyboard... bugger really as the headings do serve a usefull purpose... -- * * Rob Brown-Bayliss * ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] treview headers
Rob Brown-Bayliss wrote: >Hello, > >Is it possible to make the column headers in a gtk2 treeview widget stay >in view while scrolling? > >And, how do I get the view to scroll with the active row when useing teh >keyboard? I can move around the rows with the arrows on the keyboard, >but if I go to far down the cursor keeps moving and the view stays >static... > > Haven't run into any of these problems myself. Is the treeview packed inside a gtk.ScrolledWindow? If not, try doing that. The tree view should handle scrolling correctly in that case. swin = gtk.ScrolledWindow() swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) swin.add(treeview) 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/