I’m working with wxpython (2.8) with python 2.5.
is it possible to force a wx.CheckBox to display its label on multiple
lines?
I’d like to be able to do the same as wx.StaticText.Wrap(width)
See the attached example: the wx.CheckBox is 200 px wide, but it’s
label does not fit in this space.
Any help is really appreciated!
Thanks a lot
Mauro
#example starts here
import wx
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, title="Hello World", size=
(300,200))
self.panel = wx.Panel(self, -1)
myVSizer = wx.BoxSizer(wx.VERTICAL)
#instantiating a checkbox 200 px wide. but the label is too
long
cb = wx.CheckBox(self.panel, -1, label="This is a very very
long label for 200 pixel wide cb!", size =wx.Size(200, -1))
myVSizer.Add( cb, 1)
self.panel.SetSizer(myVSizer)
myVSizer.Layout()
app = wx.App(redirect=True)
top = MyFrame()
top.Show()
app.MainLoop()
what about something like this? Flex!
(I’ve made it a radio button to show that it still behaves like one)