I have a button labeled import (down arrow) and I am trying to determine it’s location so I can create a popup menu to say 1. from device 2. from folder.
I can’t seem to find anymore than allocation in the api docs, which is relative to the application window. Please help, I will send imaginary cookies ^_^.
using PyGI if it matters.
I figured out the answer before but couldn’t self answer yet.
The process is as follows:
: gdk_window_x, gdk_window_y
determine the location of the widget relative to it’s GdkWindow
: widget_x, widget_y
x = gdk_window_x + widget_xy = gdk_window_y + widget_yas everything in the graphics world measures from top left (unless your weird :-)), you now have the location of the top left pixel of your widget.