tkinter menu bar problem

John Pote johnpote at blueyonder.co.uk
Wed Feb 9 06:35:40 EST 2005


I have a menu bar in a top level window as follows

 menuBar = Menu(rootWin)
 menuBar.add_command( label='Quit', command=rootWin.quit)

 configMenu = Menu(menuBar, tearoff=0)
 configMenu.add_command(label='Left Device Raw', command=setLeftRaw)
 configMenu.add_command(label='Right Device Raw', command=setRightRaw)
 etc

menuBar.add_cascade(label='Config', menu=configMenu)

 rootWin.config(menu=menuBar)

Q1 Cannot find a way of changing the menu bars background colour. When 
colour options are accepted they seem to be ignored. Is this a native look 
and feel characteristic of write once run anywhere, not yet implemented or 
possibly a bug.

Q2 Some of the menu options in the config menu will not always be available 
depending on program state. How can individual items in such a menu be 
turned to faint gey to indicate their unavailability. Also a tick mark 
against an item would be useful to show the currently selected option. Is 
this possible?

Regards,
John Pote

System: Win XP, Python 2.3.4






More information about the Python-list mailing list