search for: on_move

Displaying 1 result from an estimated 1 matches for "on_move".

Did you mean: _move
2008 Mar 31
2
Mouse motion example - help
...nt does not seem to be captured right. What am I doing wrong? Thanks warrior # code below require ''wx'' class MyFrame < Wx::Frame def initialize super(nil, -1, "My Frame", :size => [300,300]) @my_panel = Wx::Panel.new(self, -1) evt_motion(){ |event| on_move(event)} Wx::StaticText.new(@my_panel, -1, :label => "Pos:", :pos => [10, 12]) @posCtrl = Wx::TextCtrl.new(@my_panel, -1, "",:pos => [40, 10]) show end def on_move(event) @pos = event.get_position @posCtrl.change_value("#{@pos}") end...