FourWaySplitter is a layout manager which manages 4 children like 4 panes in a window.
The FourWaySplitter is a layout manager which manages four children like four panes in a window. You can use a four-way splitter for example in a CAD program where you may want to maintain three orthographic views, and one oblique view of a model.
The FourWaySplitter allows interactive repartitioning of the panes by means of moving the central splitter bars. When the FourWaySplitter is itself resized, each child is proportionally resized, maintaining the same split-percentage.
The main characteristics of FourWaySplitter are:
And a lot more. See the demo for a complete review of the functionalities.
import wx import wx.lib.agw.fourwaysplitter as fws class MyFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, -1, "FourWaySplitter Demo") splitter = fws.FourWaySplitter(self, -1, agwStyle=wx.SP_LIVE_UPDATE) # Put in some coloured panels... for colour in [wx.RED, wx.WHITE, wx.BLUE, wx.GREEN]: panel = wx.Panel(splitter) panel.SetBackgroundColour(colour) splitter.AppendWindow(panel) # our normal wxApp-derived class, as usual app = wx.PySimpleApp() frame = MyFrame(None) app.SetTopWindow(frame) frame.Show() app.MainLoop()
This code snippet can be downloaded, see this example script.
Some of the AGW snippets of code in the documentation use images and external files (to create bitmaps or access external data). As these files are not provided in these snippets, you should make the approriate modifications to the code to actually run it.
This class supports the following window styles:
|Window Styles||Hex Value||Description|
|SP_NOSASH||0x10||No sash will be drawn on FourWaySplitter.|
|SP_LIVE_UPDATE||0x80||Don’t draw XOR line but resize the child windows immediately.|
|SP_3DBORDER||0x200||Draws a 3D effect border.|
This class processes the following events:
|EVT_SPLITTER_SASH_POS_CHANGED||The sash position was changed. This event is generated after the user releases the mouse after dragging the splitter. Processes a wx.wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED event.|
|EVT_SPLITTER_SASH_POS_CHANGING||The sash position is in the process of being changed. You may prevent this change from happening by calling Veto or you may also modify the position of the tracking bar to properly reflect the position that would be set if the drag were to be completed at this point. Processes a wx.wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING event.|
FourWaySplitter is distributed under the wxPython license.
Latest Revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT
Module author: Andrea Gavana <firstname.lastname@example.org>
Inheritance diagram for module: fourwaysplitter
A graphical representation of the SVN commits in the last year.
Click on any date in the picture to jump to that particular revision page, containing information about committers, log messages and SVN diffs.
No issues have been detected by 2to3.py.