I am using wxPython version: 2.8.7.1 (msw-ansi) and Windows Vista.
Please refer to my code below. The tabs/pages in the flatNotebook are not
displayed.
It starts working fine if I remove/comment-out the TextCtrl widget.
import wx
import wx.lib.flatnotebook
def create(parent):
return Frame1(parent)
[wxID_FRAME1, wxID_FRAME1FLATNOTEBOOK1, wxID_FRAME1PANEL1, wxID_FRAME1PANEL2,
wxID_FRAME1PANEL3, wxID_FRAME1TEXTCTRL1,
] = [wx.NewId() for _init_ctrls in range(6)]
class Frame1(wx.Frame):
def _init_coll_flatNotebook1_Pages(self, parent):
# generated method, don't edit
parent.AddPage(imageId=-1, page=self.panel1, select=False,
text='Pages0')
parent.AddPage(imageId=-1, page=self.panel2, select=False,
text='Pages1')
parent.AddPage(imageId=-1, page=self.panel3, select=True, text='Pages2')
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
pos=wx.Point(402, 171), size=wx.Size(747, 520),
style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
self.SetClientSize(wx.Size(731, 484))
self.flatNotebook1 = wx.lib.flatnotebook.FlatNotebook
(id=wxID_FRAME1FLATNOTEBOOK1,
name='flatNotebook1', parent=self, pos=wx.Point(0, 0),
size=wx.Size(728, 400), style=0)
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1',
parent=self.flatNotebook1, pos=wx.Point(0, 0), size=wx.Size(728,
374), style=wx.TAB_TRAVERSAL)
self.panel2 = wx.Panel(id=wxID_FRAME1PANEL2, name='panel2',
parent=self.flatNotebook1, pos=wx.Point(0, 0), size=wx.Size(728,
374), style=wx.TAB_TRAVERSAL)
self.panel3 = wx.Panel(id=wxID_FRAME1PANEL3, name='panel3',
parent=self.flatNotebook1, pos=wx.Point(0, 0), size=wx.Size(728,
374), style=wx.TAB_TRAVERSAL)
self.textCtrl1 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL1, name='textCtrl1',
parent=self, pos=wx.Point(56, 448), size=wx.Size(100, 21),
style=0, value='textCtrl1')
self._init_coll_flatNotebook1_Pages(self.flatNotebook1)
def __init__(self, parent):
self._init_ctrls(parent)
Frame1.MainLoop()