RE: [gtkmm] getting the size of a widget



Bart,
	I hooked it into the widget's size_request (or some such) slot, and
everything the size is set on the widget, it updates the pWidth and pHeight
variables.

	Erik.

> -----Original Message-----
> From: gtkmm-list-bounces gnome org 
> [mailto:gtkmm-list-bounces gnome org] On Behalf Of B.Hakvoort
> Sent: Friday, August 27, 2004 6:56 PM
> To: gtkmm-list gnome org
> Subject: Re: [gtkmm] getting the size of a widget
> 
> 
> Hi Erik,
> 
> Are you sure this is the fastest/best way to do it?
> I need such a thing and i'm just curious.
> 
> regards,
> 
> Bart
> 
> On Wed, 2004-08-25 at 17:59, Erik Ohrnberger wrote:
> > Sometimes you need to find the size of a widget.  I use this and it 
> > works.
> > 
> > 	GtkRequisition requisition = { 0, 0 };
> > 	widget.size_request( &requisition );
> > 	pWidth = requisition.width;
> > 	pHeight = requisition.height;
> > 
> > Just wanted to provide this to the list as documentation.  Someone 
> > who's maintaining the tutorial or the exmaple code, might consider 
> > adding this to those resources.
> > 
> >    Cheers and best wishes,
> >        Erik.
> > 
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org 
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> -- 
> www.titanium-it.nl --- Open Minded Open Source
> www.real-life.nl <-----Another Source
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 




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