comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Gtk.Image.Gtk_Image
Date: Thu, 24 Mar 2022 14:35:29 +0100	[thread overview]
Message-ID: <t1hs30$s7j$1@gioia.aioe.org> (raw)
In-Reply-To: fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr

On 2022-03-24 13:55, Thomas wrote:

> To display images, I had a Gtk.Pixmap.Gtk_Pixmap in a
> Gtk.Event_Box.Gtk_Event_Box.
> 
> Since Gtk.Pixmap is obsolescent, I try to replace it by
> Gtk.Image.Gtk_Image.
> 
> 
> When I replace Gtk.Pixmap.Gtk_Pixmap by Gtk.Image.Gtk_Image, it doesn't
> work.
> 
> Why? What's specific to Gtk_Pixmap or Gtk_Image so it has not the same
> behavior in Gtk_Event_Box?
> 
> 
> When I replace Gtk.Event_Box.Gtk_Event_Box by Gtk.Image.Gtk_Image, it
> works fine, except the replacement by an other image.
> (I try it using Gtk.Image.Get and Gtk.Image.Set, but it doesn't work.)
> 
> Is there an other container, that I should use instead of
> Gtk.Event_Box.Gtk_Event_Box that would work and that I should use
> to replace the image inside?

I don't know what are you trying to achieve. If you want to change a 
child of a container, remove the old child and add a new one.

Another method of doing "animation" through a set of images is by using 
a Gtk_Box. Add all images to the box use Hide on all of them and Show on 
the one show.

If you want drawing use Gtk_Drawing_Area, Cairo and event "draw" 
handler. Use Gdk_Pixbuf for drawing a whole image.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2022-03-24 13:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 12:55 Gtk.Image.Gtk_Image Thomas
2022-03-24 13:35 ` Dmitry A. Kazakov [this message]
2022-03-24 15:14   ` Gtk.Image.Gtk_Image Thomas
2022-03-24 15:47     ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-24 18:40       ` Gtk.Image.Gtk_Image Thomas
2022-03-24 20:33         ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-25  1:53           ` Gtk.Image.Gtk_Image Thomas
2022-03-25  7:29             ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-25 19:37               ` Gtk.Image.Gtk_Image Thomas
2022-03-25 20:34                 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-26  1:38                   ` Gtk.Image.Gtk_Image Thomas
2022-03-26  8:59                     ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-26 17:32                       ` Gtk.Image.Gtk_Image Thomas
2022-03-27  9:33                         ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-27 16:41                           ` Gtk.Image.Gtk_Image Thomas
2022-03-27 17:34                             ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-30  2:58                               ` Gtk.Image.Gtk_Image Thomas
2022-03-30 12:46                                 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox