Button width : Button : GUI Tk PYTHON examples


PYTHON examples » GUI Tk » Button »

 

Button width


Button width

from Tkinter import *

root = Tk()

def callback():
    print "called the callback!"

create a toolbar
toolbar = Frame(root)

b = Button(toolbar, text="new", width=16, command=callback)
b.pack(side=LEFT, padx=2, pady=2)

b = Button(toolbar, text="open", width=6, command=callback)
b.pack(side=LEFT, padx=2, pady=2)

toolbar.pack(side=TOP, fill=X)

mainloop()


           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo GUI Tk
» Button