pixmaps buttons on hided window



Hello,

     I've a hided window with 3 buttons. This window is showed when the user
select in a menu.

     Now, I'm trying to put pixmaps in this buttons but I've a problem:

============== this doesn't work

$win=new Gtk::Window dialog;

$style=$eswlist->get_style()->bg('normal');
($gdkpixmap,$mask)=Gtk::Gdk::Pixmap->create_from_xpm($win->window,$style,"buttons/install.xpm");

$pixmap=new Gtk::Pixmap($gdkpixmap,$mask);
$pixmap->show;

$vbox->pack_start($pixmap,1,1,0);
$win->add($vbox);
==============


     When I run this program, I obtein "window is not of type Gtk::Gdk::Window" ($win->window, I understand)


============== this way works
$win=new Gtk::Window dialog;
$win->show; # Window it isn't hided

$style=$eswlist->get_style()->bg('normal');
($gdkpixmap,$mask)=Gtk::Gdk::Pixmap->create_from_xpm($win->window,$style,"buttons/install.xpm");

$pixmap=new Gtk::Pixmap($gdkpixmap,$mask);
$pixmap->show;

$vbox->pack_start($pixmap,1,1,0);
$win->add($vbox);
==============

    Now works fine but I need this window hided.

    What is the correct way? Thanks.

Un Saludo,
                   Sergio Rua <srua esware com>
                   Departamento de Desarrollo.
                   http://comunidad.esware.com



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