Hi George,

Thanks for you reply. Your code below led me to the treeview pygtk
documentation (
http://www.pygtk.org/pygtk2reference/class-gtktreeview.html#method-gtktreeview--set-cursor)
and there is a third parameter that can be added to set_cursor method called
start_editing. If this is set to True the cell in the next row will
automatically enter edit mode after a single enter rather than two.

This is exactly what I was after so thanks again!

Regards,

David

On Thu, Jul 9, 2009 at 3:39 AM, George <[email protected]> wrote:

> Hi,
>
> 2009/7/7 David Sackett <[email protected]>:
> >
> > I have an objectlist with a column requiring lots of data entry. When a
> row
> > is selected and you start typing I would like the cell to automatically
> > enter edit mode and the typed text to appear in the cell. Once enter is
> > pressed I would like the new text to be stored, the next row to be
> selected
> > and the cell in the same column as the first to enter edit mode.
> >
>
> I have tried that too, but the best I could do was using "double enter" to
> start
> editing the content. Here is the code:
>
> def _on_objectlist__cell_edited(self, objectlist, item, attr):
>    treeview = objectlist.get_treeview()
>    rows, column = treeview.get_cursor()
>    next_row = rows[0] + 1
>    nitems = len(self._items)
>    if next_row < nitems:
>        treeview.set_cursor(next_row, column)
>
> []'s
>
> George
>
_______________________________________________
Kiwi mailing list
[email protected]
http://www.async.com.br/mailman/listinfo/kiwi

Reply via email to