Re: Gtk::Image location



On Mon, 20 Jul 2009 11:22:15 -0400
xp <xjpeng buffalo gmail com> wrote:
> I tried get_pointer(), but it seems not correct.
> 
> The layout of my window is like this: 
> 
> hpan.pack(list);
> hpan.pack2(scrollwindow);
> scrollwindow.add(eventbox);
> eventbox.add(image);
> 
> If I use eventbox.get_pointer(x, y). The x and y are still coordinate
> within scrollwindow, that shows the origin of eventbox is the same as
> origin of scrollwindow.
> 
> But currently, my image is located in the center of scrollwindow which
> has a offset from scrollwindow's origin.
> 
> I also tried get_origin(x, y), but it does not make sense either.

What happens if you call image.get_pointer() on event box motion notify
events?  Surely that must give you the right result?  If not, there
must be something else amiss with what you are doing.

Chris



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