Re: GtkFontSelectionDialog and GtkFontSelection

From: Date: Sat, 24 Jul 2004 10:23:37 +0000
Subject: Re: GtkFontSelectionDialog and GtkFontSelection
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4860@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. I think that's possible > 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); thoose particular buttons are accessible via the gtkfontselectiondialog properties. use this to get the ok and cancel button (i don't know the third one name :-/ $ok = $fontdialog->ok_button; $cancel = $fontdialog->cancel_button; then you connect them as other buttons regards nathan

« previous php.gtk.general (#4860) next »