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:
Handles horizontal, vertical or four way sizing via the sashes;
Delayed or live update when resizing;
Possibility to swap windows;
Setting the vertical and horizontal split fractions;
Possibility to expand a window by hiding the onther 3.
And a lot more. See the demo for a complete review of the functionalities.
Usage example:
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.App(0)
frame = MyFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
FourWaySplitter
has been tested on the following platforms:Windows (Windows XP);
Linux Ubuntu (Dapper 6.06)
This class supports the following window styles:
Window Styles |
Hex Value |
Description |
---|---|---|
|
0x10 |
No sash will be drawn on |
|
0x80 |
Don’t draw XOR line but resize the child windows immediately. |
|
0x200 |
Draws a 3D effect border. |
This class processes the following events:
Event Name |
Description |
---|---|
|
The sash position was changed. This event is generated after the user releases the mouse after dragging the splitter. Processes a |
|
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 |
FourWaySplitter
is distributed under the wxPython license.
Latest Revision: Andrea Gavana @ 16 Jul 2012, 15.00 GMT
Version 0.5
This class is very similar to |
|
This event class is almost the same as |