Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP-GTK: colors & styles

Status
Not open for further replies.

greenbirdweb

Technical User
Mar 1, 2005
9
US
I've recently picked up PHP-GTK and am loving it so far. I haven't figured out how to change colors of widgets the way I'd like. It doesn't seem to work the way I thought it did. I would like to change the background of one widget and leave the rest alone. If anyone could help, I'd appreciate it.

Here's my basic layout:

Code:
Window
|-->GtkVBox
      |-->GtkMenuBar
      |      GtkHBox
             |-->GtkFrame
             |      GtkFrame
                    |-->GtkPixmap  (white background on image)

I would like to set the background behind the image (the 2nd frame) to white, so that the image blends right into the frame. This is how I thought it worked:
Code:
$newStyle = &new GtkStyle();
$newStyle->bg[GTK_STATE_NORMAL] = $newStyle->white;

$frame2->set_style($newStyle);
Doesn't seem to work, though. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top