[PythonCE] 5 way

tracer tracer at pochtamt.ru
Wed Feb 27 10:24:20 CET 2008


Try this:


from Tkinter import *
mainw=Tk()
s_height = mainw.winfo_screenheight() / 2 
s_width = mainw.winfo_screenwidth() / 2
mainw.geometry(str(s_width) + "x" + str(s_height) + "+0+0")

mainw.bind_all("<Down>", lambda e : label1.configure(text="Down"))
mainw.bind_all("<Up>", lambda e : label1.configure(text="Up"))
mainw.bind_all("<Left>", lambda e : label1.configure(text="Left"))
mainw.bind_all("<Right>", lambda e : label1.configure(text="Right"))
mainw.bind_all("<Return>", lambda e : label1.configure(text="Return"))
mainw.bind_all("<Key-1>", lambda e : mainw.destroy())

label1= Label(mainw, text="Try navigation keys")
label1.place(x=5,y=10,width=150,height=30)

mainw.mainloop()


-- 
View this message in context: http://www.nabble.com/5-way-tp15684848p15709321.html
Sent from the Python - pythonce mailing list archive at Nabble.com.



More information about the PythonCE mailing list