Re: pixmaps buttons on hided window



You have to realize the window so that its Xwidnow is
available ($win->window variable)

so do this

$win->realize; first

Maher

--- Sergio Rua <srua esware com> wrote:
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
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list





__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com



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