parameters: (self, parent, size, orientation, alignment, visible=True, sash=None)
return_statement: return window
docstring: Creates the embedded window with the specified size, orientation, and alignment.  If the
          window is not visible it will retain the size with which it was last viewed.
docstring_summary: Creates the embedded window with the specified size, orientation, and alignment.  If the
          window is not visible it will retain the size with which it was last viewed.
docstring_tokens: Creates the embedded window with the specified size orientation and alignment . If the window is not visible it will retain the size with which it was last viewed .
function: def _CreateEmbeddedWindow(self, parent, size, orientation, alignment, visible=True, sash=None):
          """
          Creates the embedded window with the specified size, orientation, and alignment.  If the
          window is not visible it will retain the size with which it was last viewed.
          """
          window = wx.SashLayoutWindow(parent, wx.NewId(), style = wx.NO_BORDER | wx.SW_3D)
          window.SetDefaultSize(size)
          window.SetOrientation(orientation)
          window.SetAlignment(alignment)
          if sash != None:  # wx.SASH_TOP is 0 so check for None instead of just doing "if sash:"
              window.SetSashVisible(sash, True)
          ####
          def OnEmbeddedWindowSashDrag(event):
              if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE:
                  return
              sashWindow = event.GetEventObject()
              if sashWindow.GetAlignment() == wx.LAYOUT_TOP or sashWindow.GetAlignment() == wx.LAYOUT_BOTTOM:
                  size = wx.Size(-1, event.GetDragRect().height)
              else:
                  size = wx.Size(event.GetDragRect().width, -1)
              event.GetEventObject().SetDefaultSize(size)
              self._LayoutFrame()
              sashWindow.Refresh()
              if isinstance(sashWindow.GetParent(), wx.SashLayoutWindow):
                  sashWindow.Show()
                  parentSashWindow = sashWindow.GetParent()  # Force a refresh
                  parentSashWindow.Layout()
                  parentSashWindow.Refresh()
                  parentSashWindow.SetSize((parentSashWindow.GetSize().width + 1, parentSashWindow.GetSize().height + 1))
          ####
          wx.EVT_SASH_DRAGGED(window, window.GetId(), OnEmbeddedWindowSashDrag)
          window._sizeBeforeHidden = None
          if not visible:
              window.Show(False)
              if isinstance(parent, wx.SashLayoutWindow): # It's a window embedded in another sash window so remember its actual size to show it again
                  window._sizeBeforeHidden = size
          return window
function_tokens: def _CreateEmbeddedWindow ( self , parent , size , orientation , alignment , visible = True , sash = None ) : window = wx . SashLayoutWindow ( parent , wx . NewId ( ) , style = wx . NO_BORDER | wx . SW_3D ) window . SetDefaultSize ( size ) window . SetOrientation ( orientation ) window . SetAlignment ( alignment ) if sash != None : # wx.SASH_TOP is 0 so check for None instead of just doing "if sash:" window . SetSashVisible ( sash , True ) #### def OnEmbeddedWindowSashDrag ( event ) : if event . GetDragStatus ( ) == wx . SASH_STATUS_OUT_OF_RANGE : return sashWindow = event . GetEventObject ( ) if sashWindow . GetAlignment ( ) == wx . LAYOUT_TOP or sashWindow . GetAlignment ( ) == wx . LAYOUT_BOTTOM : size = wx . Size ( - 1 , event . GetDragRect ( ) . height ) else : size = wx . Size ( event . GetDragRect ( ) . width , - 1 ) event . GetEventObject ( ) . SetDefaultSize ( size ) self . _LayoutFrame ( ) sashWindow . Refresh ( ) if isinstance ( sashWindow . GetParent ( ) , wx . SashLayoutWindow ) : sashWindow . Show ( ) parentSashWindow = sashWindow . GetParent ( ) # Force a refresh parentSashWindow . Layout ( ) parentSashWindow . Refresh ( ) parentSashWindow . SetSize ( ( parentSashWindow . GetSize ( ) . width + 1 , parentSashWindow . GetSize ( ) . height + 1 ) ) #### wx . EVT_SASH_DRAGGED ( window , window . GetId ( ) , OnEmbeddedWindowSashDrag ) window . _sizeBeforeHidden = None if not visible : window . Show ( False ) if isinstance ( parent , wx . SashLayoutWindow ) : # It's a window embedded in another sash window so remember its actual size to show it again window . _sizeBeforeHidden = size return window