Re: How to change colors fro button and increase font size for button text
- From: Chas Owens <alas widomaker com>
- To: parakala suma <parakalas yahoo com>
- Cc: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: How to change colors fro button and increase font size for button text
- Date: Tue, 30 Sep 2003 10:31:11 -0400 (EDT)
Quoting parakala suma <parakalas yahoo com>:
Hi
Trying to change color for Button and increase
font-size of button Text
can anyone hepl me
Thanks
Working on the theory that the text in a button is a label and that you can
modify the label of a button I tried this
$button->child->set_markup("This is <span size='xx-large'>xx-large</span>");
and it worked. You can create the label first and add it latter like this:
$label = Gtk2::Label->new;
$label->set_markup("This is <span size='xx-large'>xx-large</span>");
$button = Gtk2::Button->new;
$button->add($label);
The colors can be changed[1] using a similar tag. You can find out more about
the markup language at
http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html
[1] It is a very bad idea to change colors or to rely on colors to impart
information. You may wish to read the HIG (human interface guidelines) at
http://developer.gnome.org/projects/gup/hig/1.0/
paying close attention to
http://developer.gnome.org/projects/gup/hig/1.0/layout.html
there are also some very good design guides at
http://developer.gnome.org/doc/guides/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]