[pygtk] how to generate scroll wheel mouse event.
John Hunter
jdhunter at ace.bsd.uchicago.edu
Thu Jan 22 06:30:06 WST 2004
>>>>> "karthik" == karthik karthik <karthik19_20 at yahoo.com> writes:
karthik> hi! i'm trying to generate all mouse events using,
karthik> "win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,100,100,0)"
karthik> and got stuck up in generating scroll wheel mouse events
karthik> such as scroll wheel up, scroll wheel down and scroll
karthik> wheel click.
karthik> may i know the appropriate call?
def scroll_event(button, event):
if event.direction == gdk.SCROLL_UP: direction=1
else: direction=-1
#do something
return gtk.TRUE
button = gtk.Button()
button.connect("scroll_event", scroll_event)
JDH
More information about the pygtk
mailing list