Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > help please, splitter windows like in maya or 3ds max

Reply
Thread Tools

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

 
 
moonrie
Guest
Posts: n/a
 
      03-13-2008
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
 
Reply With Quote
 
 
 
 
Andrew Rekdal
Guest
Posts: n/a
 
      03-13-2008
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_CHANGE D,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,p anel_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_CHANG ED,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" <>
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



 
Reply With Quote
 
 
 
 
moonrie
Guest
Posts: n/a
 
      03-13-2008
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_CHANGE D,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,p anel_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_CHANG ED,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...@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,
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read 3ds Max models in java? iherage Java 1 04-24-2006 03:40 PM
Maya Unlimited 7, and Alias MotionBuilder Pro 7, Maya Plugins Collection, Gnomon Maya eTutorials & Manuals, Maya training, ARTBEATS, Art Beats, code_fu@pathfinder.gr Digital Photography 0 02-02-2006 06:53 AM
3Ds Max Plugins Collection, updated 25/Jan/2006, Autodesk Discreet 3ds Max v8.0, 3dsmax Unplugged 2005, 3DSMAX V7, and DESPONA 10 CDS, code_fu@pathfinder.gr Digital Photography 0 02-02-2006 06:52 AM
Linking Error, 3DS Max Exporter mac C++ 3 06-24-2005 06:24 AM
Discreet 3ds Max v7.0, EDS.Unigraphics NX v3.0, bundled with Progressive.Die.Wizard, and Die.Design.Standard.Part.Library and Mold.Wizard, Cakewalk.SONAR 4 Producer Edition, Ableton.Live.v4.04, Arturia.CS80.V.v1.2, Pinnacle Studio Plus.v9.3 1, Systra astra35 NZ Computing 0 10-15-2004 11:41 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57