Re: Dev_GuiInspector

From: Date: Fri, 27 Jan 2006 17:38:59 +0000
Subject: Re: Dev_GuiInspector
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6566@lists.php.net to get a copy of this message
Christian - I can't tell from your posting whether this is Gtk1 or Gtk2. If it's Gtk1, I have the gtkentry color change working as follows: function chgBGColor(&$entryFld, $newBBColor) { $newStyle =& new GtkStyle(); $newStyle->base[GTK_STATE_NORMAL] = $newBBColor; $entryFld->set_style($newStyle); } // end new background color I've never found that 'get_style' works in Win32, either for colors or fonts. HTH, Madeleine D. Christian Weiske wrote:
- Finally, the GtkEntry doesn't highlight when I click on it. Maybe you can change the style to as a back up if the draw_rectangle doesn't do anything.
If you show me how to change the background color of a gtkentry *after* it has been realized and shows, I'll do this - I spent half an hour, but got no solution. Setting the bg before it's shown is easy, but not after (at least not for me). People write that this should work:
$rcstyle = $widget->get_modifier_style(); $rcstyle->fg[Gtk::STATE_NORMAL] = new GdkColor(255,0,0); $rcstyle->color_flags[Gtk::STATE_NORMAL] |= Gtk::RC_FG; $widget->modify_style($rcstyle);
But that doesn't do it. And a simple
$style = $entry->get_style(); $style->bg[Gtk::STATE_NORMAL] = GdkColor::parse('#FF0'); $entry->set_style($style);
doesn't work neither.


« previous php.gtk.general (#6566) next »