Hi

I am writing a program using Tk.
The program includes an Optionmenu which gets different parameters in it's "-options" parameter depending on the option which is chosen from another Optionmenu.
Thanks to the help of some great monks from the good 'ol monastery, I was able to change the options on one of the Optionmenus depending on what is chosen on the other, however, i still have a problem:
The option which is displayed on the menu doesn't change, until i press the menu and choose a different option.
To make it simple, what i would like to know is, if there is a way to change the displayed value of an option menu
by using the "-command" parameter from a different widget.

Thanks,

In reply to Changing the value of an Optionmenu by meirgold

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.