Where to find options for add_command?

Eric Brunel eric.brunel at nospam-pragmadev.com
Thu Apr 16 03:05:58 EDT 2009


Muddy Coder wrote:
> Hi Folks,
>
> When I make Menu, and add in menu items, by using add_command, such
> as:
>
> menuObj.add_command(label='Open File', command=self.open_file)
>
> It works. But, I want to make the GUI looking better. So, I want to
> change color, font, size, background, for the label of Open File. I
> got clobbered. I tried relief, fg, color, no one worked. Can somebody
> points me a website to visit, to check out what options available for
> add_command? Thanks!

Assuming you're using Tkinter, the best resource for it are the tk manual
pages, that you can find here:
http://www.tcl.tk/man/tcl8.5/TkCmd/contents.htm
It requires a little adaptation to understand how to convert tcl syntax to
Python syntax, but it's quite straightforward and doesn't take long. You'll
find the answer to your question here:
http://www.tcl.tk/man/tcl8.5/TkCmd/menu.htm#M32

HTH
 - Eric -



More information about the Python-list mailing list