Mauricio Téllez writes:

> 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),
You can use TreeView.set_cursor(path, focus_column, start_editing) to
start editing the cell.  (with start_editing=True)

You say you want the "new row get selected". I think that the row
doesn't need to be selected to start editing it. I think the cursor (a
dashed line around the row) needs to be on the row, but it doesn't
needs to be selected (which changes the rows' background to blue).

If you _do_ want the row to be selected, you can do that with
sel = TreeView.get_selection()
sel.select_path( path ) 

> and that when I finished with that cell, the thirth cell get
> "activated". I already use the "edited" signal of the render to get
> the text inserted and put that text in the model.
That means you simply have to call TreeView.set_cursor(...) in the
function you handle the 'edited' singal with.

-- 
Abel Daniel
_______________________________________________
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