From: Mark Volkmann Date: 2004-11-15T03:05:54+09:00 Subject: update delay related to TkOptionMenu In the simple code below, when I select something from the TkOptionMenubutton, it should cause the value in the TkEntry to be modified through the TkVariable named entry_var. However, the change isn't visible until I click the TkOptionMenubutton a second time. What am I missing? Is there a better way to listen for a selection to be made from the TkOptionMenubutton? Thanks! --- require 'tk' root = TkRoot.new entry_var = TkVariable.new(0) option_var = TkVariable.new('other') w = TkOptionMenubutton.new(root, option_var) w.add('Marathon') w.add('10K') w.add('other') w.pack w.menu.bind('') do entry_var.value = if option_var.value == 'Marathon' then '26.2' elsif option_var.value == '10K' then '6.2' else '0' end end TkEntry.new(root) do pack textvariable entry_var end Tk.mainloop