I’m trying to get a label on a button to be on two or more lines. I want to update this at runtime. I did like this:
self.btnGroupOne.SetLabel(u"test\ntest")
Yet, when I run the app, i just get a button with “testtest” on a single line as the label.
Am I forgetting a property that allows multiline labels or something?
BTW, when I do this:
self.btnNieuwTicket = wx.Button( self, wx.ID_ANY, u"Nieuw\nTicket", wx.DefaultPosition, wx.Size( 80,80 ), 0 )
the multiline does work…
- Platform: Windows, both 7 64bit and XP tested
- wxPython version: 2.8 unicode
- Python version: 2.7.1
It appears to be a confirmed bug in wxWidgets:
http://trac.wxwidgets.org/ticket/12491
If you give the button a multi-line label at creation,
SetLabelwill then allow multiple lines.