On Sat, Mar 13, 2004 at 01:45:58AM -0600, Mauricio Téllez wrote:

> Hi, I have a ListStore with 3 column of type gobject.TYPE_STRING, the
> first and thirth columns are editable, but the second is not. I have an
> "Add" button that when I click it append a new row to the model, so I
> want that the first cell in the view's new row get selected and ready to
> insert text (as if I clicked the cell), and that when I finished with

Use TreeView.set_cursor() and TreeView.scroll_to_cell().  I've found that I
had to put the scroll_to_cell in an idle callback to make it work right
(this may be because of the old gtk in RH9).

    view.set_cursor(newpath, viewcol, gtk.TRUE)
    gtk.idle_add(scroll_to_cell, view, newpath, viewcol)

def scroll_to_cell(view, path, viewcol):
    view.scroll_to_cell(path)

Dave Cook
_______________________________________________
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