Hello everybody,
I've been searching the lists and google about how to solve this problem. I can't seem
to find an answhere that works for me.
I am making a filemanager with autocompletion in mind. When you press keys the
selection switches to the nearest row in a clist with the filename/directory. The
problem is that if I want to continue with the arrow keys the list jumps back to the
focused row.
def entry_changed_event(self,widget):
text = widget.get_text()
r=0
if text != '':
try:
self.list.unselect_all()
while self.list.get_text(r,4).find(text) == -1 or
self.list.get_text(r,4).find(text) !=0:
r +=1
except ValueError:
widget.delete_text(0, -1)
self.list.grab_focus()
widget.hide()
return()
else:
#TODO
#gtk doesn't shift the focus to the selected row :(
#so no autoselect. You have to click the file
self.list.select_row(r,4)
self.list.moveto(r,0,0.5,0)
How can I set the focus to the same row?
I am not on the list so could you cc your replies to my mailaddress please?
Thanks,
Richard
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/