Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: Key action: Right key

from Tkinter import *
class KeyEvents(Frame):
    def __init__(self, parent=None):
        Frame.__init__( self )
        self.master.title("Keyboa

Python: link field to variable

import Tkinter
root = Tkinter.Tk()
root.title('textvariable Example')
message = Tkinter.StringVar()
Tkinter.Label(textvariable=message).pack()
Tkin

Python: Track Mouse position, in pixels

from Tkinter import *
class TkMouse( Frame ):
   def __init__( self ):
      Frame.__init__( self )
      self.pack( expand = YES, fill = BOTH )

Python: How to use checkbox

from Tkinter import *
states = []
def onPress(i):
    states[i] = not states[i]         
root = Tk( )
root.title("Option Button")
for i in range(10

Python: Binding ‘rollover’ Event to widget

from Tkinter import *
from tkMessageBox import *        
class Rollover_Button( Frame ):
   def __init__( self ):
      Frame.__init__( self )

Python: Bind Mouse events on a frame

from Tkinter import *
from tkMessageBox import *        # dialog box module
def showMessageBox(event):
   showinfo('Message',"User clicked on the f

Python: Catch the Enter key event

from Tkinter import *
root = Tk()
def onEnterKey(*ignore):
    print 'onEnterKey sur python.tubedir.com'
root.bind('', onEnterKey)
root.mainloop()

Python: Key action: Key released

from Tkinter import *
class KeyEvents(Frame):
    def __init__(self, parent=None):
        Frame.__init__( self )
        self.master.title("Keyboar

Python: Track click and double-click events

from Tkinter import *
def hi(event):
    print "The user clicked "
def quitter(event):
    print 'The user double-clicked'
    import sys; sys.exit

Python: Shift Press and Release event

from Tkinter import *
class KeyEvents(Frame):
    def __init__(self, parent=None):
        Frame.__init__( self )
        self.master.title("Shift

Python: catch middle mouse button click

from Tkinter import *
def onMiddleClick(event):
    print 'Got middle mouse button',
tkroot = Tk()
labelfont = ('courier', 20, 'bold')
widget = Lab

Python: Key action: key pressed

from Tkinter import *
class KeyEvents(Frame):
    def __init__(self, parent=None):
        Frame.__init__( self )
        self.master.title("Keyboar