SplitterWindow and SetSashPosition()

Use SplitterWindow split panel1 and panel2
Hope panel2 hide and give all frame to panel1

But I failed with following
self.panel2.Hide()
self.Refresh()
self.panel1.Layout()

    self.panel2.Layout()
    self.Layout()

Then try SetSashPosition()
self.split.SetSashPosition(-1)
self.split.SetSashPosition(-30)

This time it’s working but not very clear.

debug_scrollwin.py (2.83 KB)

···


jiang zhixiang