PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Color buttons - no more working (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Color buttons - no more working
#685
vlada (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Color buttons - no more working 3 Months ago Karma: 0  
Hello,

I'm trying to set background color for buttons as described in this sample code. Unfortunately it doesn't work.

I think I tried it before and it worked correctly. Maybe they have changed something in GTK+ recently. Could you please have a look at it.
 
  The administrator has disabled public write access.
#686
kksou (Admin)
Admin
Posts: 391
graph
User Online Now Click here to see the profile of this user
Re:Color buttons - no more working 3 Months ago Karma: 8  
Please refer to the following:

article_comments_425

Try the suggestion there and see if it works.

Regards,
/kksou
 
  The administrator has disabled public write access.
#687
vlada (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Color buttons - no more working 3 Months ago Karma: 0  
Sorry, I missed the comments.

With this modification it works. Unfortunately it is not a solution for me, because need to make it work on other people's systems. So editing the default gtkrc is not an option for me. Is there any other workaround?

I also read there is an option to create and import your own gtkrc file, where you can your own style (colors). Do you know how to it?

Thanks a lot for your great guides. I'm currently programming in PHP-GTK and PyGTK. Your guides work there after syntax modification too.

Regards,
Vlada
 
  The administrator has disabled public write access.
#691
kksou (Admin)
Admin
Posts: 391
graph
User Online Now Click here to see the profile of this user
Re:Color buttons - no more working 3 Months ago Karma: 8  
Yes, it's possible to modify some of the gtkrc style on the fly.

However, I spent some time to try it just now. It seems that if you have the "wimp" engine set in the gtkrc file, once it's loaded, there's no way you can change that.

You can try this:

1) Move the original gtkrc to some other location, or just rename it.

2) Then in the first line of your PHP-GTK program, add this:
gtk::rc_parse('path_to_your_self_defined_rc_file');

The above will work.

However, now move the gtkrc (with the "wimp" engine on) back to its original location. You will find that the above will not work.

Regards,
/kksou
 
 
Last Edit: 2008/08/20 20:16 By kksou.
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2008. kksou.com. All Rights Reserved