Hi.
i have a problem with setting the style of widget.
i want to set the bg style of the widget using bg_pixmap.

My code is some thing like this.

        win=GtkWindow()
        style=win.get_style ().copy ()
        img = GdkImlib.Image("test.png") 
        img.render()
        pix = img.make_pixmap ()
        style.bg_pixmap[STATE_NORMAL]=pix
        win.set_style(style)     
        win.show_all()

I get the following error :
 style.bg_pixmap[STATE_NORMAL]=pix
TypeError: can only assign a GdkPixmap or None       

is pix not of type GdkPixmap? if so how to solve this problem?

Ieven tried this
        win=GtkWindow()
        style=win.get_style ().copy ()
        style.bg_pixmap[STATE_NORMAL]="test.xpm"
        win.set_style(style)     
        win.show_all()
        
But got the same error.
someone please help me.

Thanks for any help.
regards
Priya


_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com




_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to