Re: [gtk-list] how to find widget size?
- From: Stephan Krings <slothkri zedat fu-berlin de>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] how to find widget size?
- Date: Thu, 15 Oct 1998 17:43:44 +0200 (CEST)
Hello,
> any way to find out the size (in pixels) of a widget that you have the
> pointer to.
>
> i.e. something like
> get_widget_size( GtkWidget *widget, gint *width, gint *height );
I both tried:
guint16 width = widget->allocation.width;
guint16 height = widget->allocation.height;
or from the Gdk-layer:
gint width, height;
gdk_window_get_size(widget->window, &width, &height);
and both solutions have worked for me.
Regards,
Stephan
--
Stephan Krings Freie Universitaet Berlin
AG Kommunikationsserver Zentraleinrichtung fuer Datenverarbeitung (ZEDAT)
slothkri@zedat.fu-berlin.de Fabeckstr. 32
Tel: +49 30 838 3239 14195 Berlin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]