Restoring Tix menus to system defaults

E

Edward K. Ream

Tix appears to ruin the highlighting of menu items by default, at least with
Python 2.3.4 on XP. That is, changing

root = Tkinter.Tk()

to

root = Tix.Tk()

causes the app not to honor the system default way of highlighting menu
items. BTW, I am aware of the discussion in WmDefault.txt.

One can set highlighting by hand as follows:

try:
import WmDefault
WmDefault.setup(root)
WmDefault.addoptions(root,{'activebackground':'DarkBlue','activeforeground':'white'})
except ImportError: [snip]

Alas, this suffers two big problems:

1. WmDefault will not be on the user's path by default; the import may
fail.
2. The code above doesn't restore the system default.

Can someone suggest a better solution? In particular,

1. Is there a workaround not using WmDefault?

2. Are there settings for 'activebackground' and 'activeforeground' that
restore the system defaults? Using '' as the color does not work.

Thanks very much.

Edward
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,212
Messages
2,571,101
Members
47,695
Latest member
KayleneBee

Latest Threads

Top