gtk.FontButtona button to launch a font
selection dialog (new in PyGTK 2.4)Synopsisgtk.FontButtongtk.Buttongtk.FontButtonfontnameNoneget_titleset_titletitleget_use_fontset_use_fontuse_fontget_use_sizeset_use_sizeuse_sizeget_font_nameset_font_namefontnameget_show_styleset_show_styleshow_styleget_show_sizeset_show_sizeshow_sizeAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Bin
+-- gtk.Button
+-- gtk.FontButton
Implemented Interfacesgtk.FontButton
implements
gtk.Buildablegtk.FontButton Propertiesgtk.Object Propertiesgtk.Widget Propertiesgtk.Container Propertiesgtk.Button Properties
"font-name"Read-WriteThe name of the currently selected font."show-size"Read-WriteIf True, the selected font size will
be shown in the label. For a more WYSIWIG way to show the
selected size, see the "use-size" property."show-style"Read-WriteIf True, the name of the selected
font style will be shown in the label. For a more WYSIWIG way
to show the selected style, see the "use-font"
property."title"Read-WriteThe title of the font selection dialog."use-font"Read-WriteIf True, the label will be drawn in
the selected font"use-size"Read-WriteIf True, the label will be drawn
with the selected font size.
gtk.FontButton Style Propertiesgtk.Widget Style Propertiesgtk.Button Style Propertiesgtk.FontButton Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal Prototypesgtk.Button Signal Prototypes"font-set"callbackfontbuttonuser_param1...DescriptionThis widget is available in PyGTK 2.4 and above.The gtk.FontButton
is a button that displays the currently selected font and, when clicked,
opens a gtk.FontSelectionDialog
to change the font. A gtk.FontButton
can be used in a preference dialog for selecting a font.Constructorgtk.FontButtonfontnameNonefontname :the name of the font to display in the font
selection dialogReturns :a new font button widgetThis constructor is available in PyGTK 2.4 and above.Creates a new gtk.FontButton
that displays the font specified by fontname or the
currently selected font if fontname is
None or not specified.Methodsgtk.FontButton.get_titleget_titleReturns :the title stringThis method is available in PyGTK 2.4 and above.The get_title() method returns the
value of the "title" property that contains the title of the font selection
dialog.gtk.FontButton.set_titleset_titletitletitle :a string containing the font selection dialog
titleThis method is available in PyGTK 2.4 and above.The set_title() method sets the "title"
property to the string specified by title and sets
the title of the gtk.FontSelectionDialog
if it exists. The "title" property contains the title of the font
selection dialog.gtk.FontButton.get_use_fontget_use_fontReturns :True, if the font button
label is written using the selected font.This method is available in PyGTK 2.4 and above.The get_use_font() method returns the
value of the "use-font" property. If "use-font" is True
the selected font is used in the label.gtk.FontButton.set_use_fontset_use_fontuse_fontuse_font :If True, the font button label
will be written using the font selected.This method is available in PyGTK 2.4 and above.The set_use_font() method sets the
"use-font" property to the value specified by
use_font. If use_font is
True, the font button label will be written using the
selected font.gtk.FontButton.get_use_sizeget_use_sizeReturns :True if the font button label
is written using the selected size.This method is available in PyGTK 2.4 and above.The get_use_size() method returns the
value of the "use-size" property. If the value of "use-size" is
True, the font button label is written using the selected
font size.gtk.FontButton.set_use_sizeset_use_sizeuse_sizeuse_size :If True, the font button label
will be written using the selected size.This method is available in PyGTK 2.4 and above.The set_use_size() method sets the
"use-size" property to the value of use_size. If
use_size is True, the font button
label will be written using the selected size.gtk.FontButton.get_font_nameget_font_nameReturns :the font name.This method is available in PyGTK 2.4 and above.The get_font_name() method returns the
value of the "font-name" property that contains the name of the currently
selected font.gtk.FontButton.set_font_nameset_font_namefontnamefontname :the name of the font to display in the font
selection dialogReturns :True if the font selection
dialog exists and the font name could be setThis method is available in PyGTK 2.4 and above.The set_font_name() method sets the
"font-name" property to the value of fontname and
updates the currently-displayed font in the font selection dialog. Returns
True if the font selection dialog exists and
fontname could be set as its font.gtk.FontButton.get_show_styleget_show_styleReturns :True if the font style will
be shown in the label.This method is available in PyGTK 2.4 and above.The get_show_style() method returns the
value of the "show-style" property. If "show-style" is
True, the name of the font style will be shown in the
font button label.gtk.FontButton.set_show_styleset_show_styleshow_styleshow_style :if True, the font style
should be displayed in the font button label.This method is available in PyGTK 2.4 and above.The set_show_style() method sets the
"show-style" property tot he value of show_style. If
show_style is True, the font style
will be displayed along with name of the selected font in the font button
label.gtk.FontButton.get_show_sizeget_show_sizeReturns :True if the font size will
be shown in the font button label.This method is available in PyGTK 2.4 and above.The get_show_size() method returns the
value of the "show-size" property. If "show-size" is
True, the font size will be shown in the font button
label.gtk.FontButton.set_show_sizeset_show_sizeshow_sizeshow_size :if True, the font size should
be displayed in the font button label.This method is available in PyGTK 2.4 and above.The set_show_size() method sets the
"show-size" property to to the value of show_size. If
show_size is True, the font size
will be displayed along with the name of the selected font in the font
button label.SignalsThe "font-set" gtk.FontButton Signalcallbackfontbuttonuser_param1...fontbutton :the fontbutton that received the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "font-set" signal is emitted when the user selects a
font. When handling this signal, use the get_font_name()
method to find out what font was just selected.