Re: Gtk::Image location



Thanks for reply.

Yes, what I want is to catch the signal of mouse motion. Actually, I
also used Gtk::EventBox. The problem is although I can catch the mouse
motion event, the event->x and event->y is for ScrollWindow, but what I
want is those coordinates to image.

So I want to know the origin coordinate of image respect to
scrollwindow. Or is there any other way to get the coordinates of image?

Best
xj


On Fri, 2009-07-17 at 18:16 -0400, José Alburquerque wrote:
> On Fri, 2009-07-17 at 10:15 -0700, pxjdream wrote: 
> > Hi All,
> > 
> > I have placed a Gtk::Image widget in a Gtk::ScrollWindow widget and can
> > display a  image.
> > 
> > Now my question is there any way to get the origin (x, y) of my Gtk::Image
> > respect to Gtk::ScrollWindow.
> 
> I wonder why you would want to get the origin of the image with respect
> to the Gtk::ScrolledWindow.  Maybe you're planning to react to some
> mouse event on the image.  In that case, maybe you can place the image
> in a Gtk::EventBox and use the signals of the event box.  If not,
> getting the Gtk::ScrolledWindow border with
> Gtk::Container::get_border_width() could be what you're looking for.
> 



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