Tkinter option_add for menu radiobutton

Discussion in 'Python' started by Bob Greschke, Feb 13, 2005.

  1. Bob Greschke

    Bob Greschke Guest

    Root.option_add("*Menu.Font", "Veranda 9")

    as an example, works fine in my program.

    Root.option_add("*Radiobutton*selectColor", "black")

    also works fine for regular radiobuttons. What I can't
    do is get the selectColor of the radiobutton's in the
    menu to be black...the x.add_radiobutton() ones.

    Root.option_add("*Menu.Radiobutton*selectColor", "black")...nope
    Root.option_add("*Menu*selectColor", "black")...no change
    Others...no luck yet.

    What would the correct command be? I can do a selectcolor = "black"
    in the declaration of each button, but...

    Thanks!

    Bob
     
    Bob Greschke, Feb 13, 2005
    #1
    1. Advertising

  2. Bob Greschke

    Eric Brunel Guest

    On Sun, 13 Feb 2005 15:31:18 -0700, Bob Greschke <> wrote:
    [snip]
    > Root.option_add("*Radiobutton*selectColor", "black")
    >
    > also works fine for regular radiobuttons. What I can't
    > do is get the selectColor of the radiobutton's in the
    > menu to be black...the x.add_radiobutton() ones.
    >
    > Root.option_add("*Menu.Radiobutton*selectColor", "black")...nope
    > Root.option_add("*Menu*selectColor", "black")...no change


    Strange... The last one works for me (as it should - see http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm). What platform are you on and what is your tcl/tk version?
    - Eric Brunel -
     
    Eric Brunel, Feb 14, 2005
    #2
    1. Advertising

  3. Bob Greschke

    Bob Greschke Guest

    "Eric Brunel" <> wrote in message
    news:eek:...
    > On Sun, 13 Feb 2005 15:31:18 -0700, Bob Greschke <>
    > wrote:
    > [snip]
    >> Root.option_add("*Radiobutton*selectColor", "black")
    >>
    >> also works fine for regular radiobuttons. What I can't
    >> do is get the selectColor of the radiobutton's in the
    >> menu to be black...the x.add_radiobutton() ones.
    >>
    >> Root.option_add("*Menu.Radiobutton*selectColor", "black")...nope
    >> Root.option_add("*Menu*selectColor", "black")...no change

    >
    > Strange... The last one works for me (as it should - see
    > http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm). What platform are you on and
    > what is your tcl/tk version?
    > - Eric Brunel -


    Doh! You're right. Now it is here too. I must have been typing something
    wrong...again. This was Python2.3 and whatever version of tcl/tk that comes
    with it on Linux.

    Thanks!
     
    Bob Greschke, Feb 14, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike

    Tkinter radiobutton border

    Mike, Apr 6, 2004, in forum: Python
    Replies:
    2
    Views:
    444
    Jeff Epler
    Apr 7, 2004
  2. Jeff Epler
    Replies:
    0
    Views:
    517
    Jeff Epler
    Aug 20, 2004
  3. Bob Greschke

    tkinter, option_add, entry field trouble

    Bob Greschke, Jun 5, 2005, in forum: Python
    Replies:
    2
    Views:
    436
    Bob Greschke
    Jun 5, 2005
  4. William Gill

    tkinter radiobutton

    William Gill, Jun 25, 2005, in forum: Python
    Replies:
    11
    Views:
    1,038
    William Gill
    Jun 29, 2005
  5. Bob Greschke

    Tkinter add_cascade option_add

    Bob Greschke, Sep 14, 2005, in forum: Python
    Replies:
    6
    Views:
    528
    Bob Greschke
    Sep 15, 2005
Loading...

Share This Page