Re: a simple color question
- From: muppet <scott asofyet org>
- To: zentara <zentara zentara net>
- Cc: gtk-perl-list gnome org
- Subject: Re: a simple color question
- Date: Wed, 27 Apr 2005 22:40:12 -0400
On Apr 27, 2005, at 3:53 PM, zentara wrote:
For example in the following script, how to I set the "active
hightlight color" of the blue button, i.e. when the mouse is over it?
/me runs the script
AUGH!! my eyes!! what a visual abomination! what is this, a Tk
program from 1994?!?
;-)
seriously, have you heard the party line on setting widget colors yet?
http://gtk2-perl.sourceforge.net/faq/#45
http://live.gnome.org/GTK2_2dPerl_2fFrequentlyAskedQuestions#head-
f2426a126839543746b99dae1a8a9fcb7250fdd1
Both of which point to http://ometer.com/gtk-colors.html
But to answer your question directly, the widget state you want it
"prelight".
http://developer.gnome.org/doc/API/2.0/gtk/gtk-Standard-
Enumerations.html#GtkStateType
A second question is how can I change the fill color of the "control
frame"? There is a hbox in the frame, but changing the hbox color
does nothing.
That's because an hbox is a no-window widget, and doesn't actually draw
anything. The same goes for the frame; notice you set the bgcolor of
the frame to red, but the only part of the frame that is red is the
outline --- which is the only thing that the frame actually draws (on
its parent's window, at that).
An event box has a window, and this setting the bgcolor for it will
cause something visible, but because of how children are packed into
frames, you will probably find this not very visually appealing.
my $window = Gtk2::Window->new('toplevel');
$window->set_title('Z');
$window ->signal_connect( 'destroy' => \&delete_event );
$window ->signal_connect( 'delete-event' => \&delete_event );
by the way, only one of these is needed. the default handler for
delete-event destroys the window, so destroy is usually sufficient.
--
muppet <scott at asofyet dot org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]