Donkyhotay / pgu

Automatically exported from code.google.com/p/pgu
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Button doesn't take unicode label #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In Button class first line to __setattr__ should have an or type == unicode 
as below:

if k == 'value' and (type(v) == str or type(v) == unicode)

However I'm not sure the correct way of setting the font for the Button. I 
tried Button(u"some chinese text", font=chinese_font), but that failed to 
change the font the button used to draw its label.

Original issue reported on code.google.com by markree...@gmail.com on 4 Apr 2010 at 6:18

GoogleCodeExporter commented 9 years ago
I may just not know how to set a font, but it looks like the font doesn't 
filter from 
the button to the label inside it, so that should be checked as well. Just 
modify 
gui3.py and set a big font.

Original comment by markree...@gmail.com on 4 Apr 2010 at 6:46

GoogleCodeExporter commented 9 years ago
This issue is fixed in the repository version (release forthcoming). Just pass 
the font into the Button constructor and it should filter through to the label:

btn = Button("Something", font=font)

Alternatively, you can set the font directly on the label:

btn.value.set_font(font)

(assuming the button contains a label widget)

Original comment by peter.ro...@gmail.com on 2 Jan 2011 at 10:16