font usage / selection in text fields
| From: | jasonr at argia dot net | Date: | Wed, 14 Feb 2024 13:40:18 +0000 |
| Subject: | font usage / selection in text fields | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-314@lists.php.net to get a copy of this message | ||
Let me start by saying php-gtk is just awseom, I have always wanted to build gui apps, but havent
had the ambition to learn a "real" programming language :)
I have of course never used gtk before, and its all a bit new to me. The problem is that i do not
know how to use the font selection and atrributes classes, which are needed to work with text
widgets. I have an example of how to use them in a "normal" gtk app, but cannot make it
work with php-gtk (i was able to figure out how to use the text widget itself though :)
the example i am looking at is at http://www.gtk.org/tutorial/sec-agtktextexample.html
I have tried various combinations of commands (from 'get_declared_classes()' I have
determined that i should be using these)
$cmap = &new gdkcolormap(); results in a "Class gdkcolormap cannot be constructed
directly"
same for $fixed_font = &new gdkfont("-misc-fixed-medium-r-*-*-*-140-*-*-*-*-*-*");
both of these (and some other stuff apperently) are needed by $text->insert()
($text being $text = &new GtkText();)
Any help would be appreciated.
Thanks,
Jason