Re: position of a widget?
- From: zentara <zentara1 sbcglobal net>
- To: gtk-perl-list gnome org
- Subject: Re: position of a widget?
- Date: Sat, 15 Sep 2007 12:13:32 -0400
On Fri, 14 Sep 2007 21:32:18 +1200
"Johan Aberg" <abergster gmail com> wrote:
Hello!
Is there a way to get the x position of a widget? Right now, I'm
working with images packed in a hbox, but this can change, I can add
frames or other widgets if that helps to get the position.
I've done a drag and drop function that drops an image into a hbox.
The image gets added to the end of the hbox but I'm trying to figure
out how to insert the dropped item between widgets already in the
hbox.
I do get the x position from the dropped item, how can I loop throug
the widgets in the hbox to see where I should insert the new widget?
May thanks!
<2 cents>
I would think with images in an hbox, you would have to
repack them, maybe that would cause a flicker?
A Gnome2::Canvas would let you drag and deposit images exactly
where you want. You could also easily get the image positions on the canvas,
and move them slightly if you needed to make room for the insertion.
I havn't found a way to get an image's x y position in an hbox, you would probably
need to go the low level gdk window, and get into all sorts of complexities.
</2cents>
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]