This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: pixmap problem
- From: Stan Pinte <alto_stan at wanadoo dot be>
- To: guile-gtk at sources dot redhat dot com
- Date: Fri, 27 Dec 2002 18:37:02 +0100
- Subject: Re: pixmap problem
- Organization: Alto Software
- References: <20021227172903.5a4b26f4.alto_stan@wanadoo.be>
- Reply-to: alto_stan at wanadoo dot be
On Fri, 27 Dec 2002 17:29:03 +0100
Stan Pinte <alto_stan@wanadoo.be> wrote:
> hello,
>
> the 'height and 'width of the pixmap of the following example is null...
>
>
> (let* ((window (gtk-window-new 'toplevel))
> (button (gtk-button-new))
> (pixmap (gtk-pixmap-new "./my-pic.xpm" button)))
> (gtk-container-add window pixmap)
> (display (gtk-widget-get pixmap 'height))
> (display (gtk-widget-get pixmap 'width))
> (gtk-widget-show window)
> (gtk-widget-show pixmap)
> (gtk-repl))
>
sorry,
I solved my problem by calling (gtk-widget-allocation-width pixmap) after having done a gtk-widget-show-all on the window. I guess that is only at paiting time that Gtk initialize all the height and width variables.
Sorry for the mess,
Stan
>
> any idea why?
>
> thanks a lot,
>
> Stan
>
> --
>
> Stanislas Pinte
>
> Computer Consultant
>
> Alto Software
> 20 Pl St Jacques
> B-4000 Liège
>
> web: http://www.altosw.be
> email: alto_stan@wanadoo.be
>
>
--
Stanislas Pinte
Computer Consultant
Alto Software
20 Pl St Jacques
B-4000 Liège
web: http://www.altosw.be
email: alto_stan@wanadoo.be