.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.splitter

.. highlight:: python



.. _wx.lib.splitter.MultiSplitterWindow:

==========================================================================================================================================
|phoenix_title|  **wx.lib.splitter.MultiSplitterWindow**
==========================================================================================================================================

This class is very similar to `wx.SplitterWindow` except that it
allows for more than two windows and more than one sash.  Many of
the same styles, constants, and methods behave the same as in
wx.SplitterWindow.  The key differences are seen in the methods
that deal with the child windows managed by the splitter, and also
those that deal with the sash positions.  In most cases you will
need to pass an index value to tell the class which window or sash
you are refering to.

The concept of the sash position is also different than in
wx.SplitterWindow.  Since the wx.Splitterwindow has only one sash
you can think of it's position as either relative to the whole
splitter window, or as relative to the first window pane managed
by the splitter.  Once there is more than one sash then the
distinciton between the two concepts needs to be clairified.  I've
chosen to use the second definition, and sash positions are the
distance (either horizontally or vertically) from the origin of
the window just before the sash in the splitter stack.

NOTE: These things are not yet supported:

    * Using negative sash positions to indicate a position offset
      from the end.

    * User controlled unsplitting (with double clicks on the sash
      or dragging a sash until the pane size is zero.)

    * Sash gravity



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>MultiSplitterWindow</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.splitter.MultiSplitterWindow_inheritance.png" alt="Inheritance diagram of MultiSplitterWindow" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.splitter.MultiSplitterWindow.html" title="This class is very similar to `wx.SplitterWindow` except that it" alt="" coords="5,392,256,421"/> <area shape="rect" id="node2" href="wx.Panel.html" title="A panel is a window on which controls are placed." alt="" coords="90,315,171,344"/> <area shape="rect" id="node3" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="82,237,179,267"/> <area shape="rect" id="node4" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="65,160,196,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="71,83,190,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="25,5,113,35"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="138,5,249,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.Panel`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.splitter.MultiSplitterWindow.__init__`                            Default class constructor.
:meth:`~wx.lib.splitter.MultiSplitterWindow.AppendWindow`                        Add a new window to the splitter at the right side or bottom
:meth:`~wx.lib.splitter.MultiSplitterWindow.DetachWindow`                        Removes the window from the stack of windows managed by the
:meth:`~wx.lib.splitter.MultiSplitterWindow.DoGetBestSize`                       Overridden base class virtual.  Determines the best size of
:meth:`~wx.lib.splitter.MultiSplitterWindow.ExchangeWindows`                     Trade the positions in the splitter of the two windows.
:meth:`~wx.lib.splitter.MultiSplitterWindow.GetMinimumPaneSize`                  Returns the smallest allowed size for a window pane.
:meth:`~wx.lib.splitter.MultiSplitterWindow.GetOrientation`                      Returns the current orientation of the splitter, either
:meth:`~wx.lib.splitter.MultiSplitterWindow.GetSashPosition`                     Returns the position of the idx'th sash, measured from the
:meth:`~wx.lib.splitter.MultiSplitterWindow.GetWindow`                           Returns the idx'th window being managed by the splitter.
:meth:`~wx.lib.splitter.MultiSplitterWindow.InsertWindow`                        Insert a new window into the splitter.
:meth:`~wx.lib.splitter.MultiSplitterWindow.ReplaceWindow`                       Replaces oldWindow (which is currently being managed by the
:meth:`~wx.lib.splitter.MultiSplitterWindow.SetBackgroundColour`                 Sets the back ground colour.
:meth:`~wx.lib.splitter.MultiSplitterWindow.SetMinimumPaneSize`                  Set the smallest size that any pane will be allowed to be
:meth:`~wx.lib.splitter.MultiSplitterWindow.SetOrientation`                      Set whether the windows managed by the splitter will be
:meth:`~wx.lib.splitter.MultiSplitterWindow.SetSashPosition`                     Set the position of the idx'th sash, measured from the left/top
:meth:`~wx.lib.splitter.MultiSplitterWindow.SizeWindows`                         Reposition and size the windows managed by the splitter.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: MultiSplitterWindow(wx.Panel)

   This class is very similar to `wx.SplitterWindow` except that it
   allows for more than two windows and more than one sash.  Many of
   the same styles, constants, and methods behave the same as in
   wx.SplitterWindow.  The key differences are seen in the methods
   that deal with the child windows managed by the splitter, and also
   those that deal with the sash positions.  In most cases you will
   need to pass an index value to tell the class which window or sash
   you are refering to.
   
   The concept of the sash position is also different than in
   wx.SplitterWindow.  Since the wx.Splitterwindow has only one sash
   you can think of it's position as either relative to the whole
   splitter window, or as relative to the first window pane managed
   by the splitter.  Once there is more than one sash then the
   distinciton between the two concepts needs to be clairified.  I've
   chosen to use the second definition, and sash positions are the
   distance (either horizontally or vertically) from the origin of
   the window just before the sash in the splitter stack.
   
   NOTE: These things are not yet supported:
   
       * Using negative sash positions to indicate a position offset
         from the end.
   
       * User controlled unsplitting (with double clicks on the sash
         or dragging a sash until the pane size is zero.)
   
       * Sash gravity

   .. method:: __init__(self, parent, id=-1, pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0, name="multiSplitter")

      Default class constructor.
      
      :param wx.Window `parent`: the parent window
      :param integer `id`: an identifier for the control: a value of -1 is taken to mean a default
      :param wx.Point `pos`: the control position. A value of (-1, -1) indicates a default position,
        chosen by either the windowing system or wxPython, depending on platform
      :param wx.Size `size`: the control size. A value of (-1, -1) indicates a default size,
        chosen by either the windowing system or wxPython, depending on platform
      :param integer `style`: the control window style
      :param string `name`: the control name


   .. method:: AppendWindow(self, window, sashPos=-1)

      Add a new window to the splitter at the right side or bottom
      of the window stack.
      
      :param `window`: the window to add to the splitter
      :param `sashPos`: if given it is used to size the new window


   .. method:: DetachWindow(self, window)

      Removes the window from the stack of windows managed by the
      splitter.  The window will still exist so you should `Hide` or
      `Destroy` it as needed.
      
      :param `window`: the window to be removed from the splitter


   .. method:: DoGetBestSize(self)

      Overridden base class virtual.  Determines the best size of
      the control based on the best sizes of the child windows.


   .. method:: ExchangeWindows(self, window1, window2)

      Trade the positions in the splitter of the two windows.
      
      :param `window1`: the first window to switch position
      :param `window2`: the second window to switch position


   .. method:: GetMinimumPaneSize(self)

      Returns the smallest allowed size for a window pane.


   .. method:: GetOrientation(self)

      Returns the current orientation of the splitter, either
      ``wx.VERTICAL`` or ``wx.HORIZONTAL``.


   .. method:: GetSashPosition(self, idx)

      Returns the position of the idx'th sash, measured from the
      left/top of the window preceding the sash.
      
      :param int `idx`: get the sash position of the given index


   .. method:: GetWindow(self, idx)

      Returns the idx'th window being managed by the splitter.
      
      :param int `idx`: get the window at the given index


   .. method:: InsertWindow(self, idx, window, sashPos=-1)

      Insert a new window into the splitter.
      
      :param int `idx`: the position to insert the window at.
      :param `window`: the window to add to the splitter
      :param `sashPos`: if given it is used to size the new window


   .. method:: ReplaceWindow(self, oldWindow, newWindow)

      Replaces oldWindow (which is currently being managed by the
      splitter) with newWindow.  The oldWindow window will still
      exist so you should `Hide` or `Destroy` it as needed.
      
      :param `oldWindow`: the window to be replace
      :param `newWindow`: the window to replace the above window


   .. method:: SetBackgroundColour(self,color)

      Sets the back ground colour.
      
      :param wx.Colour `color`: the colour to use.


   .. method:: SetMinimumPaneSize(self, minSize)

      Set the smallest size that any pane will be allowed to be
      resized to.
      
      :param int `minSize`: the minimum size of pane


   .. method:: SetOrientation(self, orient)

      Set whether the windows managed by the splitter will be
      stacked vertically or horizontally.  The default is
      horizontal.
      
      :param `orient`: either ``wx.VERTICAL`` or ``wx.HORIZONTAL``


   .. method:: SetSashPosition(self, idx, pos)

      Set the position of the idx'th sash, measured from the left/top
      of the window preceding the sash.
      
      :param int `idx`: set the sash position of the given index
      :param int `pos`: the sash position


   .. method:: SizeWindows(self)

      Reposition and size the windows managed by the splitter.
      Useful when windows have been added/removed or when styles
      have been changed.