Hi guys.
I am newcomer in wxPython.
From Frame I make wxSplitterWindow, and after that from menu I want to put in each SplitterWindow - wxTreeCtrl.
From examples I get class pyTree(wx.wxTreeCtrl) , which works fine.
Now in each splittered frame in left top corner I see minimaized point of tree.
I think it happend becouse I don't put correctly SetSize or SetSizer, I tried to do it but without any success.
My code is:
class MyFrame(wx.wxFrame):
def __init__(self):
wx.wxFrame.__init__(self, wx.NULL, -1, 'Formating SubSet FS',
wx.wxDefaultPosition, wx.wxSize(600,500))
self.CreateStatusBar()
self.SetStatusText("")
sizer = wx.wxBoxSizer(wx.wxVERTICAL)
self.SetSizer(sizer)
self.split = wx.wxSplitterWindow(self, -1)
sizer.Add(self.split,1,wx.wxEXPAND,0)
self.p1 = wx.wxWindow(self.split, -1)
self.p2 = wx.wxWindow(self.split, -1)
self.split.SplitVertically(self.p1, self.p2, 290)
menuBar = wx.wxMenuBar() # Create menu bar.
....................
wx.EVT_MENU(self, IdFO, self.MenuFileOpen)
....................
def MenuFileOpen(self, event):
wildcard = "Project file (*.afp)|*.afp|" \
"All files (*.*)|*.*"
dlg = wx.wxFileDialog(self, "Choose a saved project", os.getcwd(), "", wildcard,
wx.wxOPEN | wx.wxMULTIPLE | wx.wxCHANGE_DIR)
if dlg.ShowModal() == wx.wxID_OK:
paths = dlg.GetPaths()
if os.path.isfile(paths[0]):
fr = open(paths[0])
self.project = fr.readline()[:-1]
self.dirSFS = fr.readline()[:-1]
self.dirFS = fr.readline()[:-1]
fr.close()
# file systems formating
treeSFS = pyTree(self.p1, -1, Obj(self.dirSFS))
treeFS = pyTree(self.p2, -1, Obj(self.dirFS))
PS. pyTree have SetSize and SetSizer attributes.
I hope for your help.
Best Regards
Leonid