[pygtk] creating custom wigets with existing style info.
mike at mlb.org
Wed Oct 11 07:10:26 WST 2006
I am looking for the best way to create a custom widget with the style
information from gtkEntry ?
I have tryed setting the self.set_style(new_style) where new_style is
created by calling gtk.rc_get_style_by_paths. This look good until I
try and set the fonts size for the widget. Setting the font size of
widget.style.font_desc.set_size(x) and then call
widget.modify_font_desc() does not work. If I remove the setting of
style in the widget __init__ things work but I do not have the style
information I am trying to get.
If I modify the theme file gtkrc file to add the line to make the widget
style the same as gtkEntry then everything work.
Is there any way to set the name of the widget that the theme/style is
looked up for ? (something like like __gsignal__)
Is there any way in gtkrc file to state one widget is the same as
another ? This way I could add something at the start of the program
More information about the pygtk