[Glade-users] Click coordinates



hi

if you could show me a snippet of your code so i can figure out where
you are going wrong i might be able to help.

Thanks
Abhishek Samuel

On 5/15/05, kappa <kappka tlen pl> wrote:
I've got a problem posted by Tieum to the gtk-list, but there was no
answer for that:

[Tieum]

  Hi,
I display a BMP  in a GtkImage itself in a GtkEventBox to get mouse click.
When I click in the BMP, I want to:
1?) know the color of the clicked pixel
2?) display something around there
For this purpose, I get a GdkPixbuf from GtkImage
If the window is the size of BMP, everything is OK.
On the other way, if the window is bigger than the BMP (there's a gray part on
the left), the coord I get for the mouse click from GdkEventButton.x and
GdkEventButton.y has an offset corresponding to the width of the gray part.
How can I known the offset between the GtkEventBox (or the GtkImage) and the
GdkPixbuf ?
   Thanks,
[/Tieum]

Could You help me with that? I can't still find any answer on the Internet.

Regards,
kappa

_______________________________________________
Glade-users maillist  -  Glade-users lists ximian com
http://lists.ximian.com/mailman/listinfo/glade-users




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