how to add a seperating line between menubar and toolbar in Python using Tkinter. is that possible using Tkinter. also how to add vertical seperating line to seperate toolbar buttons in toolbar.
please help me out from this problem.
not too sure what you meant mate but www.pythonware.com has a great documentation for Tkinter, here's a link to a page on the site that may or may not help you:
The toolbar in Tkinter is usually a frame with buttons added below the menubar. Depending how you configure the frame there should be a visible separation. If you want to separate the toolbar, you could use two frames properly packed. Here is an example ...
# the toolbar is a frame with buttons and is usally put right below the menubar from Tkinter import * def callback(what=None): print "callback =", what if what == 'red': b1.config(bg="#ff0000") if what == 'blue': b2.config(bg="#0000ff") class Curry: """handles arguments for callback functions""" def __init__(self, callback, *args, **kwargs): self.callback = callback self.args = args self.kwargs = kwargs def __call__(self): return apply(self.callback, self.args, self.kwargs) root = Tk() # create the menubar menubar = Menu(root) filemenu = Menu(menubar) filemenu.add_command(label="Open", command=Curry(callback, "open")) filemenu.add_command(label="Save", command=Curry(callback, "save")) filemenu.add_command(label="Save as", command=Curry(callback, "saveas")) filemenu.add_separator() filemenu.add_command(label="Quit", command=root.destroy) # better than root.quit (at least in IDLE) menubar.add_cascade(label="File", menu=filemenu) root.config(menu=menubar) # create a toolbar with two buttons # use Frame(root, borderwidth=2, relief='raised') for more separation toolbar = Frame(root) b1 = Button(toolbar, text="red", width=6, command=Curry(callback, "red")) b1.pack(side=LEFT, padx=2, pady=2) b2 = Button(toolbar, text="blue", width=6, command=Curry(callback, "blue")) b2.pack(side=LEFT, padx=2, pady=2) toolbar.pack(side=TOP, fill=X) mainloop()
Edited by vegaseat: fixed code tags, old php tags stopped working
thank u.. i appreciate ur helping nature.... thank u. i might need more help in the future too. about the GUI of Python, so help me . thank u.
I was wondering if it was possible to create a software like visual studio (in addition simple, obviously). We could program in vb.net, c ++, etc.
Write a looping program for Theater Seating selection
The program will display the theater seating (shown later) and prompt the user to select a seat to purchase using the row ...
Hi Maam and Sir.
I need your expertise on vb.net.
I have two data grid with database on their own. I want to copy/update the data from one database to ...