Tuesday, 13 March 2012

GUI interface in python programme display window and four button


#show window and four button on that window
from Tkinter import *

root = Tk()
frame = Frame(root)
frame.pack()

bottomframe = Frame(root)
bottomframe.pack( side = BOTTOM )

redbutton = Button(frame, text="Red", fg="red",bd='4',activebackground="cyan")
redbutton.pack( side = RIGHT)

greenbutton = Button(frame, text="green",bd=4 ,fg="green",bg="violet")
greenbutton.pack( side = LEFT )



bluebutton = Button(frame, text="Blue",bd=4, fg="blue")
bluebutton.pack( side = LEFT )

blackbutton = Button(bottomframe, text="Black", fg="black",bd='4')
blackbutton.pack( side = TOP)

redbutton.flash()
root.mainloop()
#output=>




No comments:

Post a Comment

Compiler for C,C++ and Python {paste your programme to see the output}