I need help getting this code to work. I am having trouble getting the hit_test to work. It seems to be true even when the mouse is not over the control (specifically to the right of the control). case when (ht = @htmlctrl.hit_test(@htmlctrl.screen_to_client evt.get_position)) != NOT_FOUND # ... I am also trying to paint on a DC. I have attached an example of this. If you need any additional information please ask. Thanks in advance. Attachments: http://www.ruby-forum.com/attachment/4291/test.rb -- Posted via http://www.ruby-forum.com/.
John Bentley
2009-Nov-25 17:27 UTC
[wxruby-users] Help with HtmlListBox.hit_test and painting on DC
It seems I forgot to mention that the issue with the DC code is that it draws under the previous image when the window is resized. -- Posted via http://www.ruby-forum.com/.
John Bentley
2009-Nov-25 20:50 UTC
[wxruby-users] Help with HtmlListBox.hit_test and painting on DC
OK. I found a solution for the first issue. I still need help with painting on a DC. I fixed it by checking the x position. case when (ht = @htmlctrl.hit_test(@htmlctrl.screen_to_client evt.get_position)) != NOT_FOUND && @htmlctrl.screen_to_client(evt.get_position).x < @htmlctrl.get_client_size.width # ... -- Posted via http://www.ruby-forum.com/.