Re: Gtk::Image location
- From: Mark Roberts <gtkmm manumark de>
- To: xp <xjpeng buffalo gmail com>
- Cc: Chris Vine <chris cvine freeserve co uk>, gtkmm-list gnome org
- Subject: Re: Gtk::Image location
- Date: Mon, 20 Jul 2009 20:01:26 +0200 (CEST)
Hi XP,
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.
Does that mean your eventbox is larger than the image and the image is
located in the center of the eventbox? Then you should adjust the
alignment of your widgets. You want extra space to be consumed by the
scrollwindow, not by the eventbox, so that image and eventbox become the
same size.
Hope this helps.
Mark
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]