.. wxPython Phoenix documentation

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

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

.. include:: headings.inc



.. _wx.adv.SashWindow:

==========================================================================================================================================
|phoenix_title|  **wx.adv.SashWindow**
==========================================================================================================================================

:ref:`wx.adv.SashWindow`  allows any of its edges to have a sash which can be dragged to resize the window.          

The actual content window will be created by the application as a child of :ref:`wx.adv.SashWindow`. 

The window (or an ancestor) will be notified of a drag via a :ref:`wx.adv.SashEvent`  notification. 





.. _SashWindow-styles:

|styles| Window Styles
================================

This class supports the following styles: 

  

- ``wx.adv.SW_3D``: Draws a 3D effect sash and border.  
- ``wx.adv.SW_3DSASH``: Draws a 3D effect sash.  
- ``wx.adv.SW_3DBORDER``: Draws a 3D effect border.  
- ``wx.adv.SW_BORDER``: Draws a thin black border.  








.. _SashWindow-events:

|events| Events Emitted by this Class
=====================================

Handlers bound for the following event types will receive a :ref:`wx.adv.SashEvent` parameter.


- EVT_SASH_DRAGGED: Process a  ``wxEVT_SASH_DRAGGED``   event, when the user has finished dragging a sash.   
- EVT_SASH_DRAGGED_RANGE: Process a  ``wxEVT_SASH_DRAGGED_RANGE``   event, when the user has finished dragging a sash. The event handler is called when windows with ids in the given range have their sashes dragged.   








         



.. seealso:: :ref:`wx.adv.SashEvent`, :ref:`wx.adv.SashLayoutWindow`, :ref:`Events and Event Handling <events and event handling>`    







|

|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>SashWindow</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.adv.SashWindow_inheritance.png" alt="Inheritance diagram of SashWindow" 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.adv.SashWindow.html" title="wx.adv.SashWindow" alt="" coords="31,237,186,267"/> <area shape="rect" id="node2" href="wx.Window.html" title="wx.Window" alt="" coords="60,160,157,189"/> <area shape="rect" id="node3" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="50,83,167,112"/> <area shape="rect" id="node4" href="wx.Object.html" title="wx.Object" alt="" coords="5,5,92,35"/> <area shape="rect" id="node5" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="117,5,223,35"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:ref:`wx.adv.SashLayoutWindow`

|


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

================================================================================ ================================================================================
:meth:`~wx.adv.SashWindow.__init__`                                              Default constructor.
:meth:`~wx.adv.SashWindow.GetClassDefaultAttributes`                             
:meth:`~wx.adv.SashWindow.GetDefaultBorderSize`                                  Gets the default sash border size.
:meth:`~wx.adv.SashWindow.GetEdgeMargin`                                         Get border size.
:meth:`~wx.adv.SashWindow.GetExtraBorderSize`                                    Gets the addition border size between child and sash window.
:meth:`~wx.adv.SashWindow.GetMaximumSizeX`                                       Gets the maximum window size in the x direction.
:meth:`~wx.adv.SashWindow.GetMaximumSizeY`                                       Gets the maximum window size in the y direction.
:meth:`~wx.adv.SashWindow.GetMinimumSizeX`                                       Gets the minimum window size in the x direction.
:meth:`~wx.adv.SashWindow.GetMinimumSizeY`                                       Gets the minimum window size in the y direction.
:meth:`~wx.adv.SashWindow.GetSashVisible`                                        Returns ``True`` if a sash is visible on the given edge, ``False`` otherwise.
:meth:`~wx.adv.SashWindow.SashHitTest`                                           Tests for x, y over sash.
:meth:`~wx.adv.SashWindow.SetDefaultBorderSize`                                  Sets the default sash border size.
:meth:`~wx.adv.SashWindow.SetExtraBorderSize`                                    Sets the additional border size between child and sash window.
:meth:`~wx.adv.SashWindow.SetMaximumSizeX`                                       Sets the maximum window size in the x direction.
:meth:`~wx.adv.SashWindow.SetMaximumSizeY`                                       Sets the maximum window size in the y direction.
:meth:`~wx.adv.SashWindow.SetMinimumSizeX`                                       Sets the minimum window size in the x direction.
:meth:`~wx.adv.SashWindow.SetMinimumSizeY`                                       Sets the minimum window size in the y direction.
:meth:`~wx.adv.SashWindow.SetSashVisible`                                        Call this function to make a sash visible or invisible on a particular edge.
:meth:`~wx.adv.SashWindow.SizeWindows`                                           Resizes subwindows.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.adv.SashWindow.DefaultBorderSize`                                     See :meth:`~wx.adv.SashWindow.GetDefaultBorderSize` and :meth:`~wx.adv.SashWindow.SetDefaultBorderSize`
:attr:`~wx.adv.SashWindow.ExtraBorderSize`                                       See :meth:`~wx.adv.SashWindow.GetExtraBorderSize` and :meth:`~wx.adv.SashWindow.SetExtraBorderSize`
:attr:`~wx.adv.SashWindow.MaximumSizeX`                                          See :meth:`~wx.adv.SashWindow.GetMaximumSizeX` and :meth:`~wx.adv.SashWindow.SetMaximumSizeX`
:attr:`~wx.adv.SashWindow.MaximumSizeY`                                          See :meth:`~wx.adv.SashWindow.GetMaximumSizeY` and :meth:`~wx.adv.SashWindow.SetMaximumSizeY`
:attr:`~wx.adv.SashWindow.MinimumSizeX`                                          See :meth:`~wx.adv.SashWindow.GetMinimumSizeX` and :meth:`~wx.adv.SashWindow.SetMinimumSizeX`
:attr:`~wx.adv.SashWindow.MinimumSizeY`                                          See :meth:`~wx.adv.SashWindow.GetMinimumSizeY` and :meth:`~wx.adv.SashWindow.SetMinimumSizeY`
================================================================================ ================================================================================


|


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


.. class:: wx.adv.SashWindow(Window)

   **Possible constructors**::

       SashWindow()
       
       SashWindow(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
                  style=CLIP_CHILDREN|SW_3D, name="sashWindow")
       
   
   SashWindow allows any of its edges to have a sash which can be
   dragged to resize the window.



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



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Default constructor.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=CLIP_CHILDREN|SW_3D, name="sashWindow")`
      
      Constructs a sash window, which can be a child of a frame, dialog or any other non-control window.                  
      
      
      
      
      :param `parent`: Pointer to a parent window.   
      :type `parent`: wx.Window
      :param `id`: Window identifier. If -1, will automatically create an identifier.   
      :type `id`: wx.WindowID
      :param `pos`: Window position. DefaultPosition is (-1, -1) which indicates that SashWindows should generate a default position for the window. If using the :ref:`wx.adv.SashWindow`  class directly, supply an actual position.   
      :type `pos`: wx.Point
      :param `size`: Window size. DefaultSize is (-1, -1) which indicates that SashWindows should generate a default size for the window.   
      :type `size`: wx.Size
      :param `style`: Window style. For window styles, please see :ref:`wx.adv.SashWindow`.   
      :type `style`: long
      :param `name`: Window name.   
      :type `name`: string
      
      
      
      
      
      
      
      
      
      
      
      
      
      
                        
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)




      :param `variant`: 
      :type `variant`: wx.WindowVariant




      :rtype: :ref:`VisualAttributes`








   .. method:: GetDefaultBorderSize(self)

      Gets the default sash border size.                  

      :rtype: `int`








   .. method:: GetEdgeMargin(self, edge)

      Get border size.                  


      :param `edge`: 
      :type `edge`: wx.adv.SashEdgePosition




      :rtype: `int`








   .. method:: GetExtraBorderSize(self)

      Gets the addition border size between child and sash window.                  

      :rtype: `int`








   .. method:: GetMaximumSizeX(self)

      Gets the maximum window size in the x direction.                  

      :rtype: `int`








   .. method:: GetMaximumSizeY(self)

      Gets the maximum window size in the y direction.                  

      :rtype: `int`








   .. method:: GetMinimumSizeX(self)

      Gets the minimum window size in the x direction.                  

      :rtype: `int`








   .. method:: GetMinimumSizeY(self)

      Gets the minimum window size in the y direction.                  

      :rtype: `int`








   .. method:: GetSashVisible(self, edge)

      Returns ``True`` if a sash is visible on the given edge, ``False`` otherwise.                  




      :param `edge`: Edge. One of ``wx.adv.SASH_TOP``, ``wx.adv.SASH_RIGHT``, ``wx.adv.SASH_BOTTOM``, ``wx.adv.SASH_LEFT``.  
      :type `edge`: wx.adv.SashEdgePosition






      :rtype: `bool`



                  



      .. seealso:: :meth:`SetSashVisible`     








   .. method:: SashHitTest(self, x, y, tolerance=2)

      Tests for x, y over sash.                  


      :param `x`: 
      :type `x`: int
      :param `y`: 
      :type `y`: int
      :param `tolerance`: 
      :type `tolerance`: int




      :rtype: :ref:`wx.adv.SashEdgePosition`








   .. method:: SetDefaultBorderSize(self, width)

      Sets the default sash border size.                  


      :param `width`: 
      :type `width`: int







   .. method:: SetExtraBorderSize(self, width)

      Sets the additional border size between child and sash window.                  


      :param `width`: 
      :type `width`: int







   .. method:: SetMaximumSizeX(self, min)

      Sets the maximum window size in the x direction.                  


      :param `min`: 
      :type `min`: int







   .. method:: SetMaximumSizeY(self, min)

      Sets the maximum window size in the y direction.                  


      :param `min`: 
      :type `min`: int







   .. method:: SetMinimumSizeX(self, min)

      Sets the minimum window size in the x direction.                  


      :param `min`: 
      :type `min`: int







   .. method:: SetMinimumSizeY(self, min)

      Sets the minimum window size in the y direction.                  


      :param `min`: 
      :type `min`: int







   .. method:: SetSashVisible(self, edge, visible)

      Call this function to make a sash visible or invisible on a particular edge.                  




      :param `edge`: Edge to change. One of ``wx.adv.SASH_TOP``, ``wx.adv.SASH_RIGHT``, ``wx.adv.SASH_BOTTOM``, ``wx.adv.SASH_LEFT``.   
      :type `edge`: wx.adv.SashEdgePosition
      :param `visible`: ``True`` to make the sash visible, ``False`` to make it invisible.  
      :type `visible`: bool






                  



      .. seealso:: :meth:`GetSashVisible`     








   .. method:: SizeWindows(self)

      Resizes subwindows.                   





   .. attribute:: DefaultBorderSize

      See :meth:`~wx.adv.SashWindow.GetDefaultBorderSize` and :meth:`~wx.adv.SashWindow.SetDefaultBorderSize`


   .. attribute:: ExtraBorderSize

      See :meth:`~wx.adv.SashWindow.GetExtraBorderSize` and :meth:`~wx.adv.SashWindow.SetExtraBorderSize`


   .. attribute:: MaximumSizeX

      See :meth:`~wx.adv.SashWindow.GetMaximumSizeX` and :meth:`~wx.adv.SashWindow.SetMaximumSizeX`


   .. attribute:: MaximumSizeY

      See :meth:`~wx.adv.SashWindow.GetMaximumSizeY` and :meth:`~wx.adv.SashWindow.SetMaximumSizeY`


   .. attribute:: MinimumSizeX

      See :meth:`~wx.adv.SashWindow.GetMinimumSizeX` and :meth:`~wx.adv.SashWindow.SetMinimumSizeX`


   .. attribute:: MinimumSizeY

      See :meth:`~wx.adv.SashWindow.GetMinimumSizeY` and :meth:`~wx.adv.SashWindow.SetMinimumSizeY`

