Re: [gtk-list] Re: Saving window size



On Thu, 6 May 1999, Brian Cooke wrote:

> Sven LUTHER wrote:
> > 
> > On Thu, May 06, 1999 at 01:15:51PM +0000, Brian Cooke wrote:
> > > I have a problem (which should be easy to solve).
> > >
> > > I can't find the documentation or any examples on how to save the size
> > > of a window (ie. the width and height).  I was hoping there would be
> > > some nice easy calls for this (like there is for everything else I've
> > > needed), but I can't find them.
> > 
> > I think you can find it by accessing the structure of the widget directly, not so
> > clean i agree, but it is the method suggested in the tutorial ...
> > 
> > In particular, it is not so nice to language bindings ...
> > 
> > Friendly,
> > 
> > Sven LUTHER
> > 
> > --
> > To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> That was pretty much the answer, or atleast enough for me to find a
> solution.  I had to use the GdkWindow *window from the GtkWidget struct
> and use the Gdk function "gdk_window_get_size(dialog->window, &width,
> &height);" and everything works great now.

actually, GTK_WIDGET (window)->allocation.width and
GTK_WIDGET (window)->allocation.height cover those values already, and you
don't need to bother the Gdk layer in this case.

> 
> Thanks again,
> 
> -Brian
> 

---
ciaoTJ



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