GtkFontSelectionDialog and GtkFontSelection
| From: | dpgirago at mdanderson dot org | Date: | Fri, 23 Jul 2004 18:01:42 +0000 |
| Subject: | GtkFontSelectionDialog and GtkFontSelection | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-4858@lists.php.net to get a copy of this message | ||
I've been accessing font data through the GtkFontSelectionDialog() widget,
and then using this information with GtkStyle() to create a font type like
this:
$buttonStyle = &new GtkStyle();
$font = gdk::font_load('-unknown-Microsoft Sans
Serif-bold-r-normal-*-15-*-*-*-p-*-iso8859-1');
$buttonStyle->font = $font;
$exitButton = &new GtkButton(' EXIT ');
$label = $exitButton->child;
$label->set_style($buttonStyle);
This works just fine, but I'm wondering if/how I can use
GtkFontSelection() with its member methods to change/set fonts?
I've been through the manual and the Wiki but haven't found anything
useful about this.
A second question is how to access the 'OK' and 'Cancel' buttons in the
GtkFontSelectionDialog() object. It seems that they should be children of
the parent object, but
when I try:
$fontdialog = &new GtkFontSelectionDialog('Select Font');
$fontChild = $fontdialog->children();
print_r($fontChild);
the result is:
Array
(
[0] => GtkVBox Object
(
[0] => 2
)
)
And I'm not sure what to do with this information.
Solutions will be posted to the Wiki.
Thanks in advance for your help.
dave