.. 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.gizmos.dynamicsash

.. highlight:: python



.. _wx.lib.gizmos.dynamicsash.DynamicSashWindow:

==========================================================================================================================================
|phoenix_title|  **wx.lib.gizmos.dynamicsash.DynamicSashWindow**
==========================================================================================================================================

A DynamicSashWindow widget manages the way other widgets are viewed. When
a DynamicSashWindow is first shown, it will contain one child view, a
viewport for that child, and a pair of scrollbars to allow the user to
navigate the child view area.  Next to each scrollbar is a small tab.  By
clicking on either tab and dragging to the appropriate spot, a user can
split the view area into two smaller views separated by a draggable sash.
Later, when the user wishes to reunify the two subviews, the user simply
drags the sash to the side of the window. DynamicSashWindow will
automatically reparent the appropriate child view back up the window
hierarchy, and the DynamicSashWindow will have only one child view once
again.

As an application developer, you will simply create a DynamicSashWindow
using either the Create() function or the more complex constructor
provided below, and then create a view window whose parent is the
DynamicSashWindow.  The child should respond to DynamicSashSplitEvents --
perhaps with an OnSplit() event handler -- by constructing a new view
window whose parent is also the DynamicSashWindow.  That's it!  Now your
users can dynamically split and reunify the view you provided.

If you wish to handle the scrollbar events for your view, rather than
allowing DynamicSashWindow to do it for you, things are a bit more
complex.  (You might want to handle scrollbar events yourself, if, for
instance, you wish to scroll a subwindow of the view you add to your
DynamicSashWindow object, rather than scrolling the whole view.) In this
case, you will need to construct your DynamicSashWindow without the
wxDS_MANAGE_SCROLLBARS style and  you will need to use the GetHScrollBar()
and GetVScrollBar() methods to retrieve the scrollbar controls and call
SetEventHandler() on them to redirect the scrolling events whenever your
window is reparented by wxDyanmicSashWindow. You will need to set the
scrollbars' event handler at three times:

    *  When your view is created When your view receives a
    *  DynamicSashSplitEvent When your view receives a
    *  DynamicSashUnifyEvent

See the dynsash_switch sample application for an example which does this.



|

|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>DynamicSashWindow</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.gizmos.dynamicsash.DynamicSashWindow_inheritance.png" alt="Inheritance diagram of DynamicSashWindow" 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.gizmos.dynamicsash.DynamicSashWindow.html" title="A DynamicSashWindow widget manages the way other widgets are viewed. When" alt="" coords="5,315,357,344"/> <area shape="rect" id="node2" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="133,237,230,267"/> <area shape="rect" id="node3" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="116,160,247,189"/> <area shape="rect" id="node4" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="122,83,241,112"/> <area shape="rect" id="node5" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="76,5,164,35"/> <area shape="rect" id="node6" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="189,5,299,35"/> </map> 
   </p>
   </div>

|


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

:class:`wx.Window`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.gizmos.dynamicsash.DynamicSashWindow.__init__`                    Create a new DynamicSashWindow.
:meth:`~wx.lib.gizmos.dynamicsash.DynamicSashWindow.AddChild`                    AddChild(child)
:meth:`~wx.lib.gizmos.dynamicsash.DynamicSashWindow.Create`                      Create(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=PanelNameStr) -> bool
:meth:`~wx.lib.gizmos.dynamicsash.DynamicSashWindow.GetHScrollBar`               
:meth:`~wx.lib.gizmos.dynamicsash.DynamicSashWindow.GetVScrollBar`               
================================================================================ ================================================================================


|


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


.. class:: DynamicSashWindow(wx.Window)

   A DynamicSashWindow widget manages the way other widgets are viewed. When
   a DynamicSashWindow is first shown, it will contain one child view, a
   viewport for that child, and a pair of scrollbars to allow the user to
   navigate the child view area.  Next to each scrollbar is a small tab.  By
   clicking on either tab and dragging to the appropriate spot, a user can
   split the view area into two smaller views separated by a draggable sash.
   Later, when the user wishes to reunify the two subviews, the user simply
   drags the sash to the side of the window. DynamicSashWindow will
   automatically reparent the appropriate child view back up the window
   hierarchy, and the DynamicSashWindow will have only one child view once
   again.
   
   As an application developer, you will simply create a DynamicSashWindow
   using either the Create() function or the more complex constructor
   provided below, and then create a view window whose parent is the
   DynamicSashWindow.  The child should respond to DynamicSashSplitEvents --
   perhaps with an OnSplit() event handler -- by constructing a new view
   window whose parent is also the DynamicSashWindow.  That's it!  Now your
   users can dynamically split and reunify the view you provided.
   
   If you wish to handle the scrollbar events for your view, rather than
   allowing DynamicSashWindow to do it for you, things are a bit more
   complex.  (You might want to handle scrollbar events yourself, if, for
   instance, you wish to scroll a subwindow of the view you add to your
   DynamicSashWindow object, rather than scrolling the whole view.) In this
   case, you will need to construct your DynamicSashWindow without the
   wxDS_MANAGE_SCROLLBARS style and  you will need to use the GetHScrollBar()
   and GetVScrollBar() methods to retrieve the scrollbar controls and call
   SetEventHandler() on them to redirect the scrolling events whenever your
   window is reparented by wxDyanmicSashWindow. You will need to set the
   scrollbars' event handler at three times:
   
       *  When your view is created When your view receives a
       *  DynamicSashSplitEvent When your view receives a
       *  DynamicSashUnifyEvent
   
   See the dynsash_switch sample application for an example which does this.

   .. method:: __init__(self, \*args, \*\*kw)

      Create a new DynamicSashWindow.
      
      Both the normal constructor style with all parameters, or wxWidgets
      2-phase style default constructor is supported. If the default
      constructor is used then the Create method will need to be called
      later before the widget can actually be used.


   .. method:: AddChild(self, child)

      AddChild(child)
      
      Adds a child window.


   .. method:: Create(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=DS_DEFAULT, name='dynamicSashWindow')

      Create(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=PanelNameStr) -> bool


   .. method:: GetHScrollBar(self, child)


   .. method:: GetVScrollBar(self, child)