On Sun, Mar 14, 2004 at 02:42:52PM +0100, Riccardo Galli wrote: > I'm implementing in a liststore the selection by keyboard. > so, when a user press shift+upArrow or shif+downArrow I select one line more. > > Now I'd like to do the same thing when user press shif+pageUp, > shif+pageDown, but I can't find a way to calculate how many rows are > in a page (how many rows are visible).
Note that at least the old CList in mode SELECTION_MULTIPLE allowed you to select using shift-Up/Down/PgUp/PgDown -- are you sure the TreeView doesn't let yo? Lorenzo suggests using http://www.pygtk.org/pygtk2reference/class-gtktreeview.html#method-gtktreeview--get-visible-rect You can use that function to get the visible rect, then divide rect.height / row_height and you get the number of rows. It doesn't work with a TreeView that don't have fixed height rows, though. You can, however, do a treeview.get_background_area on a random cell and get an aproximation of the row height. Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
