wxPython Can't change font

211
March 26, 2018, at 00:20 AM

I am trying to get the system font, modify it a bit and then set to a static text:

panel = wx.Panel()
font = wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT)
font.SetPointSize(20)
vbox = wx.BoxSizer(wx.VERTICAL)
hbox1 = wx.BoxSizer(wx.HORIZONTAL)
class_name_text = wx.StaticText(panel, label='Class name')
class_name_text.SetFont(font)
hbox1.Add(class_name_text)
vbox.Add(hbox1)
panel.SetSizer(vbox)

But apparently the text still remains with point size 12 (it looks that). However, when i print the point size before and after changing it seems to be ok (12 before - 20 after). A have tried to create my own font and changing its properties - in that case everything works. What is wrong?

Rent Charter Buses Company
READ ALSO
Compare dataframe values to a specific column within the same row

Compare dataframe values to a specific column within the same row

I want to compare values within all rows of a dataframe to a specific column within the same rowI managed to do it by iterating over all rows, and it works OK for smaller datasets, but starts to cause issues as the number of rows and columns is increasing

167
Python PrettyTable Sort By 2 Values

Python PrettyTable Sort By 2 Values

I have a Python PrettyTable() setup in which I am sorting through many numbersI would like to be able to sort through one group of numbers, highest to lowest, while also sorting through another group of numbers

317
Key Error, But not sure why

Key Error, But not sure why

I am using the Pima Indian Dataset, and I am getting an errorHere is the code:

189