Tix.HList - Move Cursor

I

ivan

Hello,

How do I move the keyboard cursor position in a Tix.HList?

I am using an HList with the right mouse button bound to pop up a
menu. If the right click is done on an unselected item, I change the
selection to that item. This works, however the keyboard cursor
position remains at the last item selected with arrow keys or left
click. How can I move this as well as the selection?

def onrightclick(event):
rightselected=hlist1.nearest(event.y)
if hlist1.selection_includes(rightselected) <> "0":
callpopup(rightselected)
else:
hlist1.selection_clear()
hlist1.selection_set(rightselected)
callpopup(rightselected)

hlist1.bind("<Button-3>", onrightclick)

Thanks,
Ivan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top