SetMinimumPaneSize hides the panel located under the sash for a MultiSplitterWindow

28 views
Skip to first unread message

ericpell...@gmail.com

unread,
Apr 7, 2022, 2:47:14 AM4/7/22
to wxPython-users

Hi all,

I have the following code which generates a MultiSplitterWindow with four panels:

import wx
from wx.lib.splitter import MultiSplitterWindow

class SamplePanel(wx.Panel):
    def __init__(self, parent, colour):
        wx.Panel.__init__(self, parent)
        self.SetBackgroundColour(colour)

class MainFrame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, title="MultiSplitterWindow Tutorial")

        splitter = MultiSplitterWindow(self, style=wx.SP_LIVE_UPDATE)
        colours = ["pink", "yellow", "sky blue", "Lime Green"]

        for colour in colours:
            panel = SamplePanel(splitter, colour) splitter.AppendWindow(panel)

        splitter.SetOrientation(wx.VERTICAL)
        splitter.SetMinimumPaneSize(50)
        self.Show()

if  __name__ == "__main__":
    app = wx.App(False)
    frame = MainFrame()
    app.MainLoop()

When running that code, the SetMinimumPaneSize method produces its effect for the panels located over the sashes but not for the panels located below the sashes. The results of this is that the panels below the sashes can completely disappear. Is that a bug or do I misunderstand something about the SetMinimumPaneSize method ?

Thank you very much

Eric

Dietmar Schwertberger

unread,
Apr 7, 2022, 12:34:45 PM4/7/22
to wxpytho...@googlegroups.com
It is not good style to post the same questions on discuss,
wxpython-users and Stackoverflow.

This will not motivate people to answer.


Regards,

Dietmar

Reply all
Reply to author
Forward
0 new messages