
import wx
class StaticTextFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, 'Static Text Example', size=(400, 300))
panel = wx.Panel(self, -1)
wx.StaticText(panel, -1, "This is an example of static text", (100, 10))
right = wx.StaticText(panel, -1, "align right", (100, 70), (160, -1), wx.ALIGN_RIGHT)
right.SetForegroundColour('white')
right.SetBackgroundColour('black')
app = wx.PySimpleApp()
frame = StaticTextFrame()
frame.Show()
app.MainLoop()