LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-31-2012, 04:16 AM   #1
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73
Blog Entries: 1

Rep: Reputation: 2
gtk problem:How to stretch the background image using pygtk.


Hi all,

I wanted to use a png file to be my python program's backgound image.
Having followed internet suggestion, I use gtkrcstyle to do this job.
In python codes, I use this codes to parse rc string:

gtk.rc_parse_string(color_rc)

And the color_rc is as follows:

Code:
 color_rc= """
pixmap_path "/usr/share/*****/pixmaps"

style "bar" {
    
    engine "pixmap"{
                 function = FLAT_BOX
                 file     = "filtertype.png"
                 stretch  = TRUE 
        }
}  widget "*foo" style "bar"
But I found this doesn't work.gtk.rc_parse_string didn't parse engine "pixmap".
The gtk.rc_parse_string just parse bg_pixmap[NORMAL] = "filtertype.png".

How to use the gtk engine to stretch the background image?

Thanks.

Jimtony

Last edited by jimtony; 07-31-2012 at 04:17 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] pygtk Gtk.DrawingArea - no expose event RockDoctor Programming 1 10-01-2011 07:43 AM
Help on driconf (gtk and pygtk) zaqwe Slackware 7 09-03-2007 07:46 AM
SuSe 10.1/KDE Screensaver with Background Image Problem northwarks SUSE / openSUSE 2 11-01-2006 12:18 PM
installing pygtk... cant find gtk true_atlantis Linux - Software 8 01-15-2004 01:37 PM
Making the background stretch to fill your desktop in fluxbox ShibbyLinux Linux - General 2 04-11-2002 07:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration