set the default font on a Gtk::Text widget
- From: Dirk Koopman <djk tobit co uk>
- To: gtk-perl-list gnome org
- Subject: set the default font on a Gtk::Text widget
- Date: 21 Jul 2001 13:49:16 +0100
I am a newbie, I have read as much of the documentation as I can find
but cannot find an answer to my problem.
How do I permanently set the default font of a Gtk::Text widget. I have
done:-
my $font =
Gtk::Gdk::Font->load("-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-koi8-r");
my $text = new Gtk::Text(undef,undef);
$text->style->font($font);
$text->show;
etc
This has no effect either for (default) output or for input.
I can deal with output by:-
$text->insert($font, undef, undef, "foo");
but I cannot affect the input font on an editable window.
I have a supplimentary question:-
In an 'activate' callback how do I obtain the last line typed in by the
user? Oh and how do I make sure that the focus remains on the edittable
Gtk::Text window (there are two text widgets, one for display, one for
input [it is a classical chat type app]).
Regards
Dirk Koopman G1TLH
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]