Re: How can I colorize a Gtk::Entry field?



Hi Christoph!

Christoph Lorenz schrieb am Sonntag, den 11. November 2001:


can anybody please tell me, what is the correct way to colorize a
Gtk::Entry field?

I already tried with ->set_foreground($color) with 
my $color = Gtk::Gdk::Color->parse_color("red");

but it failed with a "
Can't locate object method "set_foreground" via package "Gtk::Entry"
error :(

And is there also a way to "remove" the color settings and to give the
field back its original (defined by the theme) color setting?


The only way to use colors seems to use Gtk::Text instead of Gtk::Entry:

   In order to insert text at the current insertion point of a Text
   widget, the function insert() is used, which also allows us to specify
   background and foreground colors and a font for the text.

     $text->insert( $font, $foreground, $background, $string );

HTH,

Manfred

-- 
 /"\                        |  *  AIM: mahowi42  *  ICQ: 61597169  *
 \ /  ASCII ribbon campaign | PGP-Key available at Public Key Servers
  X   against HTML mail     | or "http://www.mahowi.de/pgp/mahowi.asc";
 / \  and postings          |  * RSA: 0xC05BC0F5 * DSS: 0x4613B5CA *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]