Getting the correct position of mouseclicks from a pixmap?



Hi,

I want to get the position of mouseclicks from a GtkPixmap, so I put it in
a GtkEventBox to get the button_press_event. To allow that the size of the
pixmap is bigger than the toplevel window, I put the GtkEventBox in a
GtkScrolledWindow.

If I click the pixmap, I actually get the position of the clicks relative
to the GtkEventBox. How do I get the position relative to the GtkPixmap?


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]