Works for me on wxPython 3.0.0-msw (Classic), though I had to add more code since you didn’t post a complete demonstration:
···
#---------------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, -1, "Editors and Renderers Demo", size=(640,480))
mypnl = myPanel(self, -1)
mypnl.create_bulk_test_setup_area()
sizer = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(mypnl, 1)
self.SetSizer(sizer)
class myPanel(wx.Panel):
def create_bulk_test_setup_area(self):
#######################Bulk Test Setup Area####################################
self.cmtsDevicesTextCtrl = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE)
cmtsDetailsStaticBox = wx.StaticBox(self, label = "CMTS Devices")
cmtsDetailsStaticBoxSizer = wx.StaticBoxSizer(cmtsDetailsStaticBox, wx.VERTICAL)
cmtsDetailsStaticBoxSizer.Add(self.cmtsDevicesTextCtrl,1)
self.rfgwDevicesTextCtrl = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE)
rfgwDetailsStaticBox = wx.StaticBox(self, label = "RFGW Devices")
rfgwDetailsStaticBoxSizer = wx.StaticBoxSizer(rfgwDetailsStaticBox, wx.VERTICAL)
rfgwDetailsStaticBoxSizer.Add(self.rfgwDevicesTextCtrl,1)
self.rfgwDevicesTextCtrl1 = wx.TextCtrl(self, -1)#, style=wx.TE_MULTILINE)
rfgwDetailsStaticBox1 = wx.StaticBox(self, label = "RFGW Devices")
rfgwDetailsStaticBoxSizer1 = wx.StaticBoxSizer(rfgwDetailsStaticBox1, wx.VERTICAL)
rfgwDetailsStaticBoxSizer1.Add(self.rfgwDevicesTextCtrl1,1)
self.devicesHBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
self.devicesHBoxSizer.Add(cmtsDetailsStaticBoxSizer,1)
self.devicesHBoxSizer.Add(rfgwDetailsStaticBoxSizer,1)
self.devicesHBoxSizer.Add(rfgwDetailsStaticBoxSizer1,1)
self.SetSizer(self.devicesHBoxSizer)
#---------------------------------------------------------------------------
if name == ‘main’:
import sys
app = wx.App()
frame = TestFrame(None, sys.stdout)
frame.Show(True)
app.MainLoop()
#---------------------------------------------------------------------------
On Wednesday, November 5, 2014 12:14:12 PM UTC-8, Neamtu Dan wrote:
Hi all,
I am seeing a very strange issue. I am trying to place a simple multiline textCTRL inside a staticboxsizer. I manage to do so, but it is not editable. If I do not make it Multiline, it is editable. Also, I have no problem putting a multiline editable textCTRL outside a staticboxsizer.
To give you a better picture of what I mean, please see the below code:
def create_bulk_test_setup_area(self):
#######################Bulk Test Setup Area####################################
self.cmtsDevicesTextCtrl = wx.TextCtrl(self, -1, size=(190,100), style=wx.TE_MULTILINE)
cmtsDetailsStaticBox = wx.StaticBox(self, label = "CMTS Devices")
cmtsDetailsStaticBoxSizer = wx.StaticBoxSizer(cmtsDetailsStaticBox, wx.VERTICAL)
cmtsDetailsStaticBoxSizer.Add(self.cmtsDevicesTextCtrl)
self.rfgwDevicesTextCtrl = wx.TextCtrl(self, -1, size=(190,100), style=wx.TE_MULTILINE)
rfgwDetailsStaticBox = wx.StaticBox(self, label = "RFGW Devices")
rfgwDetailsStaticBoxSizer = wx.StaticBoxSizer(rfgwDetailsStaticBox, wx.VERTICAL)
rfgwDetailsStaticBoxSizer.Add(self.rfgwDevicesTextCtrl)
self.devicesHBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
self.devicesHBoxSizer.Add(cmtsDetailsStaticBoxSizer)
self.devicesHBoxSizer.Add(rfgwDetailsStaticBoxSizer)
It behaves as if I would have specified READONLY, which as you can see is not the case. I am using MAC Maverick.
Any ideas what can be going on?
Thanks,
Dan