From: Jesus Jesus Date: 2009-06-03T14:00:35+09:00 Subject: Re: invoke a event in ruby/tk Hidetoshi NAGAI wrote: > From: Jesus Jesus > Subject: invoke a event in ruby/tk > Date: Wed, 3 Jun 2009 01:46:17 +0900 > Message-ID: >> i have a TkEntry and A TkTable and i need to invoke the events of "Up" >> and "Down" of the TkTable To change the selection of cell as well as if >> it were selected. for reasons unnecessary to explain i need to hold the >> focus in the Tkentry.Please write a suggestion on how to do this. > > For example, require "tk" require 'tkextlib/tktable' root=TkRoot.new entry=TkEntry.new(root).place(:x=>0,:y=>0) table=Tk::TkTable.new(root).place(:x=>0,:y=>40) table['selecttype']='row' table.selection_set('0,0') entry.focus #here is my doubt #entry.bind("Up",proc{call Tktable.bind("Up")})??????? #remember that we cant to lose the focus from the entry #my intention is replic the event up and down when Tktable has the focus #my first idea was invoke a default event. in this case 'up' 'Down' #i dont know if this is possble #do you have a better idea? Tk.mainloop -- Posted via http://www.ruby-forum.com/.