From: John M. <li...@ji...> - 2008-04-16 20:26:50
|
Alex Schenkman wrote: > I am trying to drag an image over other images. > The problem is that the coordiantes I get with event.position are > relative to the component right under, and I would need absolute > coordinates, since I have many images on top of my background. I found the specific functions I was thinking of: wx.Window.ScreenToClient wx.Window.ClientToScreen So, if you can get the component that your size is relative to, you could do: screen_pos = right_under.ClientToScreen(event.position) absolute_pos = background.ScreenToClient(screen_pos) Does that make sense? I've never done anything like this in PythonCard/wxWidgets, but similar approaches in other systems have worked out for me in the past. -- John McCormick |