I would like to start searching the list from the current selection down for
a particular piece of text. 

I have no way of knowing WHERE I am in the list so that I can start this
search.

I want something along the lines of: 

        # Search from the currently selected to the end.
        for row in range(current_selection, total_number_of_rows):
                node = tree.node_nth(row)
                #If we have the text, jump to that node, and select it.
                if (tree.node_get_text(node, 3)==search_string):
                        tree.select_row(row=row_number,col=-1)
                        tree.moveto(row=row_number)

But I can't figure out which row is selected.

I can get the selected Node from the tree.selection[] array, but I have
no way of getting the row.

I can't manually keep track of the selected row, because the selection
signal handler receives a NODE!!!

Any Ideas?

--Phil

Compaq:  High Performance Server Division/Benchmark Performance Engineering 
---------------- Alpha, The Fastest Processor on Earth --------------------
[EMAIL PROTECTED]        |C|O|M|P|A|Q|        [EMAIL PROTECTED]
------------------- See the results at www.spec.org -----------------------

On Wed, 24 Jan 2001, Alexandre Fayolle wrote:

> On Tue, 23 Jan 2001, Phillip Ezolt wrote:
> 
> > I've search and searched but can't find the answer to the following question:
> > 
> > Given a GtkCTreeNode, how do I find its row number? 
> 
> As far as I know, you can't (but I may well be wrong). However, you should
> not need to do this, since all GtkCList methods requiring a row number are
> available in GtkCTree with the GtkCTreeNode as an argument (the name of
> the method is then prefixed by 'node_'. 
> 
> May I ask why you need to access this information?
> 
> Alexandre Fayolle
> -- 
> http://www.logilab.com 
> Narval is the first software agent available as free software (GPL).
> LOGILAB, Paris (France).
> 
> 


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to