search for: my_panel

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

2008 Mar 31
2
Mouse motion example - help
...mple adapted from the wxpython book, but the mouse motion event 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_po...