Restoring Tix menus to system defaults

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Edward K. Ream

    #1

    Restoring Tix menus to system defaults

    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.addop tions(root,{'ac tivebackground' :'DarkBlue','ac tiveforeground' :'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 'activebackgrou nd' and 'activeforegrou nd' that
    restore the system defaults? Using '' as the color does not work.

    Thanks very much.

    Edward
    --------------------------------------------------------------------
    Edward K. Ream email: edreamleo@chart er.net
    Leo: Literate Editor with Outlines
    Leo: http://webpages.charter.net/edreamleo/front.html
    --------------------------------------------------------------------


Working...