This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pixmap problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]