I’ve nested splited windows in this way and I am able to change the sash gravity “propotional position” of the horizontal splits but not of the vertical one, any idea?
class MyFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, -1, "ScrolledThumb Demo", size=(1600,800))
splitter = wx.SplitterWindow(self)
splitter2 = wx.SplitterWindow(splitter)
vsplitter = wx.SplitterWindow(splitter)
thumbnail_angles = ThumbnailAngles(vsplitter)
preview_panel = ImagePreview(vsplitter)
thumbnail_panel = ThumbnailsPanel(splitter2)
action_panel = ActionPanel(splitter2)
vsplitter.SetSplitMode(wx.SPLIT_VERTICAL)
vsplitter.SplitVertically(thumbnail_angles, preview_panel)
vsplitter.SetSashGravity(0.2)
splitter2.SplitHorizontally(thumbnail_panel, action_panel)
splitter2.SetSashGravity(0.5)
splitter.SplitHorizontally(vsplitter, splitter2)
splitter.SetSashGravity(0.5)
menubar = wx.MenuBar()
fileMenu = wx.Menu()
newitem = wx.MenuItem(fileMenu,wx.ID_NEW, text="New", kind=wx.ITEM_NORMAL)
fileMenu.Append(newitem)
fileMenu.AppendSeparator()
quit = wx.MenuItem(fileMenu, wx.ID_EXIT, '&Quit\tCtrl+Q')
fileMenu.Append(quit)
open_files = wx.MenuItem(fileMenu, wx.ID_OPEN , text="Add Images", kind=wx.ITEM_NORMAL )
fileMenu.Append(open_files)
fileMenu.Bind(event=wx.EVT_MENU, handler=self.myFunc, source=open_files)
menubar.Append(fileMenu, '&File')
self.SetMenuBar(menubar)
self.Centre()
wx.CallLater(100, self.Maximize, True)