ng150716
ng150716

Reputation: 2244

Universal wxPython Styles

I'm fairly new to wxPython, and have been using it to build a GUI. However, I find it tedious to use "wx.Font" and then "SetFont" to make changes. Is there anyway to universally change the style for all fonts in my gui?

Upvotes: 0

Views: 112

Answers (1)

Mike Driscoll
Mike Driscoll

Reputation: 33111

You have to set the font for the parent of the widgets BEFORE you create the children widgets. See also:

Once you have the parent's font set, its children will inherit the font too. If you want to change the font after the program is running, you will have to iterate over all of the children and call each of their SetFont methods. You can get a list of children widgets using parent.GetChildren().

Upvotes: 1

Related Questions