Re: position of widget / widget at position





  Hello,

######################################################################
========================================================================
>   I looked into the doc, and found no way of doing the following :
> 
> - What is the x,y position (absolute screen coordinates, or relative
>   to the "toplevel" gtk window) of a widget?

gdk_window_get_position(GdkWindow *window, gint *x, gint *y);

=======================================================================

  Yes, but where is the GdkWindow * ? I only have GtkXYZ's ...

######################################################################

 I think Alexander Kotelnikov, on the "Re: Window size" thread has
answered. I'll try that :

######################################################################
> I have had problems getting window sizes, now if some kind soul would be
> kind enough to tell me is there any way to know the size of a window
> before gtk_main has gotten control, I would be ever grateful. Knowing the
> size of a window would be important in, for example, positioning windows
> on the right edge of the screen.
> 
I hope 
GtkWidet *widget;
gint width, height;
...
gdk_window_get_size (widget->window, &width, &height);

will do.
######################################################################


  Cheers,

  Etienne




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