events - how to invoke a method from an Entry Widget in Ruby Tk -


i'm looking option or way bind event, invokes method entry-widget.

like command option button-widgets: command { method } or

like binding event combobox-widgets: $combobox.bind("<comboboxselected>") { method }

now i'm looking similar entry-widgets. want invoke method every time entry (value) has been edited. that's initial situation:

$foo = tkvariable.new $entry = tk::tile::entry.new(parent) {   validate 'key'; validatecommand method; textvariable $foo   } 

validatecommand works @ first time.

if change content of widget during validation callback , still want have validation callback applied in future, must re-apply validation callback. documented (for core tk version of this, see the end of validation section of entry docs) pretty obscure, fair.

use tk::after.idle schedule code reapply validation callback inside validation callback.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -