Re: Gnome::Pixmap::load_file



Rolf Herzog wrote:

Hi,

I have constructed a dialog with Glade and Glade::Perl that contains a
Gnome::Pixmap. Now I want to change the Pixmap at runtime with the
load_file method. The file seems to be loaded, since memory is
consumed, but nothing is displayed. I have tried $pixmap->show(),
realize, map but nothing succeeded. Only show_all() from the toplevel
window worked, but it displayed a second instance of my dialog, which
wasn't intended. What can I do to show the image?
Hi,

What happens if you put another window in front of the pixmap (after
you have shown it) and then uncover it - maybe you have to cause it 
to redraw.

Or perhaps you could destroy it and create a new one:

  $form->{'pixmap7'}->destroy;  
  $form->{'pixmap8'} = new_from_file Gnome::Pixmap("file.xpm" );
  $form->{'frame233'}->add($form->{'pixmap8'} );
  $form->{'pixmap8'}->show;

I don't know what the memory costs of this are - I guess that the 
original pixmap will hang around until you destroy the form and every
reference to it but I don't know - perhaps you can work it out.

Regards, Dermot




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