VOOZH about

URL: https://www.geeksforgeeks.org/python/wxpython-change-font-of-statictext/

⇱ wxPython - Change Font of StaticText - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

wxPython - Change Font of StaticText

Last Updated : 10 Sep, 2022

In this article we are going to learn how can we change the font of static text present on the window. To do this first of all, we will create a wx.Font class of wxPython. After this we will use SetFont() function of wx.StaticText class. SetFont() function takes a sing wx.Font type parameter.

Syntax: wx.StaticText.SetFont(self, font) Parameters:

ParameterInput TypeDescription
fontwx.FontFont for the static text.

Code Example: 

Output Window: 👁 Image

Comment