Button mouse action: mouse in, out and rollover,mouserollover,# Button dem
Button mouse action: mouse in, out and rollover,mouserollover,# Button dem
# Button demonstration.from Tkinter import *from tkMessageBox import *class PlainAndFancy( Frame ): def __init__( self ): Frame.__init__( self ) self.pack( expand = YES, fill = BOTH ) self.master.title( 'Buttons' ) self.plainButton = Button( self, text = 'Plain Button', command = self.pressedPlain ) self.plainButton.bind( '<Enter>', self.rolloverEnter ) self.plainButton.bind( '<Leave>', self.rolloverLeave ) self.plainButton.pack( side = LEFT, padx = 5, pady = 5 ) def pressedPlain( self ): showinfo( 'Message', 'You pressed: Plain Button' ) def rolloverEnter( self, event ): event.widget.config( relief = GROOVE ) def rolloverLeave( self, event ): event.widget.config( relief = RAISED )def main(): PlainAndFancy().mainloop()if __name__ == '__main__': main()
- Warning bmp on a Label,warninglabel,from Tkinter
- Make default not global,makeglobal,def f(x, y=N
- Passing value or passing address,passingvalue,def try_
- String replacement,stringreplacement,S = 'spammy'
- Specify Documentation Strings during function definition,
- Product in Python,productinpython,print '6 * 3
热门文章:
相关内容
- Warning bmp on a Label,warninglabel,from Tkinter
- Make default not global,makeglobal,def f(x, y=N
- Passing value or passing address,passingvalue,def try_to_c
- String replacement,stringreplacement,S = 'spammy'
- Specify Documentation Strings during function definition,,# Here is
- Product in Python,productinpython,print '6 * 3
- A tuple is an immutable list,tupleimmutable,t = ('a', 'b
- Demonstrates the range() function,demonstratesrange,print 'Count
- Demonstrates the range() function with negative step,,print '\n\nC
- Translate #define's into Python assignments,,'''PYTHON SO
评论关闭