|
class gtk.FontButton(gtk.Button): |
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Button +-- gtk.FontButton
|
gtk.Container Signal Prototypes
"font-set" | def callback( |
This 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.
gtk.FontButton(fontname
=None)
| the name of the font to display in the font selection dialog |
Returns : | a new font button widget |
This 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.
def get_title()
Returns : | the title string |
This 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.
def set_title(title
)
| a string containing the font selection dialog title |
This 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.
def get_use_font()
Returns : | 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.
def set_use_font(use_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.
def get_use_size()
Returns : | 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.
def set_use_size(use_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.
def get_font_name()
Returns : | 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.
def set_font_name(fontname
)
| the name of the font to display in the font selection dialog |
Returns : | True if the font selection
dialog exists and the font name could be set |
This 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.
def get_show_style()
Returns : | 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.
def set_show_style(show_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.
def get_show_size()
Returns : | 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.
def set_show_size(show_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.
def callback(fontbutton
, user_param1
, ...
)
| the fontbutton that received the signal |
| the first user parameter (if any) specified
with the connect () |
| 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.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.