Re: Gtk::Image location
- From: xp <xjpeng buffalo gmail com>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: gtkmm-list gnome org
- Subject: Re: Gtk::Image location
- Date: Wed, 22 Jul 2009 18:12:08 -0400
I used alignment widget as Mark suggest. Now it works fine.
Thank you all.
xj
On Tue, 2009-07-21 at 22:35 +0100, Chris Vine wrote:
> 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]