help please, splitter windows like in maya or 3ds max

John at Quintivity jstanforth at gmail.com
Thu Mar 13 12:32:55 CET 2008


Sounds like this might do exactly what you need...
http://xoomer.alice.it/infinity77/main/FourWaySplitter.html

Cheers,
John



On Thu, Mar 13, 2008 at 1:45 AM, moonrie <moonrie at gmail.com> wrote:

> On Mar 13, 12:47 pm, "Andrew Rekdal" <<nospam>@comcast.net> wrote:
> > This seems to work... split then split each side. then tandem the size.
> >
> > import wx
> >
> > class Layout(wx.Frame):
> >
> > def __init__(self, parent, id, title):
> >
> > wx.Frame.__init__(self, parent, id, title)
> >
> > sizer = wx.BoxSizer(wx.HORIZONTAL)
> >
> > panel = wx.Panel(self,-1)
> >
> > splitter = wx.SplitterWindow(panel)
> >
> > sizer_left = wx.BoxSizer(wx.VERTICAL)
> >
> > panel_left = wx.Panel(splitter,-1)
> >
> > splitter_left = wx.SplitterWindow(panel_left)
> >
> > splitter_left.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED,self.leftChange
> ,id=splitter_left.GetId())
> >
> > panel_left_upper = wx.Panel(splitter_left,style= wx.BORDER_SUNKEN)
> >
> > panel_left_upper.SetBackgroundColour("WHITE")
> >
> > panel_left_lower = wx.Panel(splitter_left,style= wx.BORDER_SUNKEN)
> >
> > splitter_left.SplitHorizontally(panel_left_upper,panel_left_lower)
> >
> > sizer_left.Add(splitter_left,1,wx.EXPAND)
> >
> > sizer_right = wx.BoxSizer(wx.VERTICAL)
> >
> > panel_right = wx.Panel(splitter,-1)
> >
> > splitter_right =wx.SplitterWindow(panel_right)
> >
> > splitter_right.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED,self.rightChange
> ,id=splitter_right.GetId())
> >
> > panel_right_upper = wx.Panel(splitter_right,style= wx.BORDER_SUNKEN)
> >
> > panel_right_lower = wx.Panel(splitter_right,style= wx.BORDER_SUNKEN)
> >
> > panel_right_lower.SetBackgroundColour("WHITE")
> >
> > splitter_right.SplitHorizontally(panel_right_upper,panel_right_lower)
> >
> > sizer_right.Add(splitter_right,1,wx.EXPAND)
> >
> > splitter.SplitVertically(panel_left,panel_right)
> >
> > sizer.Add(splitter,1,wx.EXPAND)
> >
> > panel.SetSizer(sizer)
> >
> > panel_left.SetSizer(sizer_left)
> >
> > panel_right.SetSizer(sizer_right)
> >
> > self.splitter_left = splitter_left
> >
> > self.splitter_right = splitter_right
> >
> > def leftChange(self,event):
> >
> > pos = self.splitter_left.GetSashPosition()
> >
> > self.splitter_right.SetSashPosition(pos)
> >
> > event.Skip()
> >
> > def rightChange(self,event):
> >
> > pos = self.splitter_right.GetSashPosition()
> >
> > self.splitter_left.SetSashPosition(pos)
> >
> > event.Skip()
> >
> > app = wx.App(0)
> >
> > k = Layout(None, -1, 'layout.py')
> >
> > k.Show(True)
> >
> > app.MainLoop()
> >
> > -- Andrew
> >
> > ----- Original Message -----
> > From: "moonrie" <moon... at gmail.com>
> >
> > Newsgroups: comp.lang.python
> > Sent: Wednesday, March 12, 2008 10:19 PM
> > Subject: help please, splitter windows like in maya or 3ds max
> >
> > > hi, everyone there, I am doing a 3D modeling project. I like to do it
> > > with Python( am a newbie), but have no idea with the wxSplitterWindow
> > > to create the 4-view windows( top, front, side, perspective), like the
> > > mfc CSplitterWnd guy),
> > > anyone can give me some help with wxPython?
> >
> > > thanks in advance.
> >
> > > - moonrie
>
> should be these ones,
>
> thanks, :P
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080313/ef1842c0/attachment.html>


More information about the Python-list mailing list