Multisash questions

Hello!

I would like to use the wx.lib.multisash class to recreate some Excel like functionality.

1. By default, multisash can split both horizontally and vertically. I would like only horizontal splits. How do I do this?

2. What methods attributes control the scroll-bars? I'd like ALL views to scroll when ANY sash is scrolled.

Thanks!

Gregg Lind
U of Minnesota, USA
Departments of Biostatistics and Epidemiology

Example code:

···

#----------------------------------
import wx
import wx.lib.multisash as sash
import wx.grid as gridlib

class MyGrid(gridlib.Grid):
    def __init__(self, parent):
        gridlib.Grid.__init__(self, parent, -1, style=wx.NO_BORDER)
        self.CreateGrid(15,5)
   
class MyFrame(wx.Frame):
  def __init__(self, parent, ID, title):
    wx.Frame.__init__(self, parent, ID, title,
      wx.DefaultPosition, wx.Size(200, 150))

        multi = sash.MultiSash(self, -1, pos = (0,0), size = (640,480))
    multi.SetDefaultChildClass(MyGrid)

   class MyApp(wx.App):
  def OnInit(self):
    frame = MyFrame(None, -1, "Multisash test")
    frame.Show(True)
    self.SetTopWindow(frame)
    return True

app = MyApp(0)
app.MainLoop()
#----------------------------------

Gregg Lind -- Biostatistics wrote:

Hello!

I would like to use the wx.lib.multisash class to recreate some Excel like functionality.

1. By default, multisash can split both horizontally and vertically. I would like only horizontal splits. How do I do this?

That will probably require some surgery in multisash.py, probably at least in the MultiCreator class. If you make some changes there that are generally useful then please send a patch.

2. What methods attributes control the scroll-bars? I'd like ALL views to scroll when ANY sash is scrolled.

The scrollbars are managed by the child windows, so you'll need to catch the scroll events from the grid windows, and then manually scroll the others.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!