Package wx :: Class SplitterWindow
[frames | no frames]

Type SplitterWindow

object --+            
         |            
    Object --+        
             |        
    EvtHandler --+    
                 |    
            Window --+
                     |
                    SplitterWindow

Known Subclasses:
Crust, Filling, ThinSplitterWindow

wx.SplitterWindow manages up to two subwindows or panes, with an optional vertical or horizontal split which can be used with the mouse or programmatically.

Styles

wx.SP_3D Draws a 3D effect border and sash.
wx.SP_3DSASH Draws a 3D effect sash.
wx.SP_3DBORDER Synonym for wxSP_BORDER.
wx.SP_BORDER Draws a standard border.
wx.SP_NOBORDER No border (default).
wx.SP_NO_XP_THEME Under Windows XP, switches off the attempt to draw the splitter using Windows XP theming, so the borders and sash will take on the pre-XP look.
wx.SP_PERMIT_UNSPLIT Always allow to unsplit, even with the minimum pane size other than zero.
wx.SP_LIVE_UPDATE Don't draw XOR line but resize the child windows immediately.

Events

EVT_SPLITTER_SASH_POS_CHANGING The sash position is in the process of being changed. May be used to 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.
EVT_SPLITTER_SASH_POS_CHANGED The sash position was changed. May be used to modify the sash position before it is set, or to prevent the change from taking place.
EVT_SPLITTER_UNSPLIT The splitter has been just unsplit.
EVT_SPLITTER_DCLICK The sash was double clicked. The default behaviour is to unsplit the window when this happens (unless the minimum pane size has been set to a value greater than zero.)

Method Summary
SplitterWindow __init__(self, parent, id, pos, size, style, name)
Constructor.
  __repr__(self)
bool Create(self, parent, id, pos, size, style, name)
Create the GUI part of the SplitterWindow for the 2-phase create.
int GetBorderSize(self)
Gets the border size
VisualAttributes GetClassDefaultAttributes(variant)
Get the default attributes for this class. (Static method)
int GetMinimumPaneSize(self)
Gets the minimum pane size in pixels.
bool GetNeedUpdating(self)
double GetSashGravity(self)
Gets the sash gravity.
int GetSashPosition(self)
Returns the surrent sash position.
int GetSashSize(self)
Gets the sash size
int GetSplitMode(self)
Gets the split mode
Window GetWindow1(self)
Gets the only or left/top pane.
Window GetWindow2(self)
Gets the right/bottom pane.
  Initialize(self, window)
Initializes the splitter window to have one pane.
bool IsSplit(self)
Is the window split?
bool ReplaceWindow(self, winOld, winNew)
This function replaces one of the windows managed by the SplitterWindow with another one.
bool SashHitTest(self, x, y, tolerance)
Tests for x, y over the sash
  SetBorderSize(self, width)
Sets the border size.
  SetMinimumPaneSize(self, min)
Sets the minimum pane size in pixels.
  SetNeedUpdating(self, needUpdating)
  SetSashGravity(self, gravity)
Set the sash gravity.
  SetSashPosition(self, position, redraw)
Sets the sash position, in pixels.
  SetSashSize(self, width)
Sets the sash size.
  SetSplitMode(self, mode)
Sets the split mode.
  SizeWindows(self)
Resizes subwindows
bool SplitHorizontally(self, window1, window2, sashPosition)
Initializes the top and bottom panes of the splitter window.
bool SplitVertically(self, window1, window2, sashPosition)
Initializes the left and right panes of the splitter window.
bool Unsplit(self, toRemove)
Unsplits the window.
  UpdateSize(self)
Causes any pending sizing of the sash and child panes to take place immediately.
    Inherited from Window
bool AcceptsFocus(self)
Can this window have focus?
bool AcceptsFocusFromKeyboard(self)
Can this window be given focus by keyboard navigation? if not, the only way to give it focus (provided it accepts it at all) is to click it.
  AddChild(self, child)
Adds a child window.
  AssociateHandle(self, handle)
Associate the window with a new native handle
  CacheBestSize(self, size)
Cache the best size so it doesn't need to be calculated again, (at least until some properties of the window change.)
  CaptureMouse(self)
Directs all mouse input to this window.
  Center(self, direction)
Centers the window.
  CenterOnParent(self, dir)
Center with respect to the the parent window
  CenterOnScreen(*args, **kwargs)
<function CenterOnScreen at 0xb7bc94c4> is deprecated
  Centre(self, direction)
Centers the window.
  CentreOnParent(self, dir)
Center with respect to the the parent window
  CentreOnScreen(*args, **kwargs)
<function CenterOnScreen at 0xb7bc94c4> is deprecated
  ClearBackground(self)
Clears the window by filling it with the current background colour.
Point ClientToScreen(self, pt)
Converts to screen coordinates from coordinates relative to this window.
(x,y) ClientToScreenXY(x, y)
Converts to screen coordinates from coordinates relative to this window.
bool Close(self, force)
This function simply generates a EVT_CLOSE event whose handler usually tries to close the window.
Point ConvertDialogPointToPixels(self, pt)
Converts a point or size from dialog units to pixels.
Size ConvertDialogSizeToPixels(self, sz)
Converts a point or size from dialog units to pixels.
Point ConvertPixelPointToDialog(self, pt)
Size ConvertPixelSizeToDialog(self, sz)
bool Destroy(self)
Destroys the window safely.
bool DestroyChildren(self)
Destroys all children of a window.
bool Disable(self)
Disables the window, same as Enable(false).
  DissociateHandle(self)
Dissociate the current native handle from the window
Point DLG_PNT(self, pt)
Converts a point or size from dialog units to pixels.
Size DLG_SZE(self, sz)
Converts a point or size from dialog units to pixels.
  DragAcceptFiles(self, accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
bool Enable(self, enable)
Enable or disable the window for user input.
Window FindFocus()
Returns the window or control that currently has the keyboard focus, or None. (Static method)
Window FindWindowById(self, winid)
Find a chld of this window by window ID
Window FindWindowByName(self, name)
Find a child of this window by name
  Fit(self)
Sizes the window so that it fits around its subwindows.
  FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a window.
  Freeze(self)
Freezes the window or, in other words, prevents any updates from taking place on screen, the window is not redrawn at all.
AcceleratorTable GetAcceleratorTable(self)
Gets the accelerator table for this window.
Size GetAdjustedBestSize(self)
This method is similar to GetBestSize, except in one thing.
bool GetAutoLayout(self)
Returns the current autoLayout setting
Colour GetBackgroundColour(self)
Returns the background colour of the window.
int GetBackgroundStyle(self)
Returns the background style of the window.
Size GetBestFittingSize(self)
This function will merge the window's best size into the window's minimum size, giving priority to the min size components, and returns the results.
Size GetBestSize(self)
This function returns the best acceptable minimal size for the window, if applicable.
(width, height) GetBestSizeTuple()
This function returns the best acceptable minimal size for the window, if applicable.
Size GetBestVirtualSize(self)
Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)
int GetBorder(self, flags)
GetBorder(self) -> int
Window GetCapture()
Returns the window which currently captures the mouse or None (Static method)
Caret GetCaret(self)
Returns the caret associated with the window.
int GetCharHeight(self)
Get the (average) character size for the current font.
int GetCharWidth(self)
Get the (average) character size for the current font.
PyObject GetChildren(self)
Returns a list of the window's children.
Point GetClientAreaOrigin(self)
Get the origin of the client area of the window relative to the window's top left corner (the client area may be shifted because of the borders, scrollbars, other decorations...)
Rect GetClientRect(self)
Get the client area position and size as a wx.Rect object.
Size GetClientSize(self)
This gets the size of the window's 'client area' in pixels.
(width, height) GetClientSizeTuple()
This gets the size of the window's 'client area' in pixels.
LayoutConstraints GetConstraints(self)
Returns a pointer to the window's layout constraints, or None if there are none.
Sizer GetContainingSizer(self)
Return the sizer that this window is a member of, if any, otherwise None.
Cursor GetCursor(self)
Return the cursor associated with this window.
VisualAttributes GetDefaultAttributes(self)
Get the default attributes for an instance of this class.
Window GetDefaultItem(self)
Get the default child of this parent, i.e.
DropTarget GetDropTarget(self)
Returns the associated drop target, which may be None.
EvtHandler GetEventHandler(self)
Returns the event handler for this window.
long GetExtraStyle(self)
Returns the extra style bits for the window.
Font GetFont(self)
Returns the default font used for this window.
Colour GetForegroundColour(self)
Returns the foreground colour of the window.
(width, height, descent, externalLeading) GetFullTextExtent(string, font)
Get the width, height, decent and leading of the text using the current or specified font.
Window GetGrandParent(self)
Returns the parent of the parent of this window, or None if there isn't one.
long GetHandle(self)
Returns the platform-specific handle (as a long integer) of the physical window.
String GetHelpText(self)
Gets the help text to be used as context-sensitive help for this window.
int GetId(self)
Returns the identifier of the window.
String GetLabel(self)
Generic way of getting a label from any window, for identification purposes.
int GetMaxHeight(self)
Size GetMaxSize(self)
int GetMaxWidth(self)
int GetMinHeight(self)
Size GetMinSize(self)
int GetMinWidth(self)
String GetName(self)
Returns the windows name.
Window GetParent(self)
Returns the parent window of this window, or None if there isn't one.
Point GetPosition(self)
Get the window's position.
(x,y) GetPositionTuple()
Get the window's position.
Rect GetRect(self)
Returns the size and position of the window as a wx.Rect object.
int GetScrollPos(self, orientation)
Returns the built-in scrollbar position.
int GetScrollRange(self, orientation)
Returns the built-in scrollbar range.
int GetScrollThumb(self, orientation)
Returns the built-in scrollbar thumb size.
Size GetSize(self)
Get the window size.
Sizer GetSizer(self)
Return the sizer associated with the window by a previous call to SetSizer or None if there isn't one.
(width, height) GetSizeTuple()
Get the window size.
(width, height) GetTextExtent(string)
Get the width and height of the text using the current font.
bool GetThemeEnabled(self)
Return the themeEnabled flag.
String GetTitle(self)
Gets the window's title.
ToolTip GetToolTip(self)
get the associated tooltip or None if none
Rect GetUpdateClientRect(self)
Get the update rectangle region bounding box in client coords.
Region GetUpdateRegion(self)
Returns the region specifying which parts of the window have been damaged.
Validator GetValidator(self)
Returns a pointer to the current validator for the window, or None if there is none.
Size GetVirtualSize(self)
Get the the virtual size of the window in pixels.
(width, height) GetVirtualSizeTuple()
Get the the virtual size of the window in pixels.
long GetWindowStyle(self)
Gets the window style that was passed to the constructor or Create method.
long GetWindowStyleFlag(self)
Gets the window style that was passed to the constructor or Create method.
int GetWindowVariant(self)
bool HasCapture(self)
Returns true if this window has the current mouse capture.
bool HasFlag(self, flag)
Test if the given style is set for this window.
bool HasScrollbar(self, orient)
Does the window have the scrollbar for this orientation?
bool HasTransparentBackground(self)
Returns True if this window's background is transparent (as, for example, for wx.StaticText) and should show the parent window's background.
bool Hide(self)
Equivalent to calling Show(False).
int HitTest(self, pt)
Test where the given (in client coords) point lies
int HitTestXY(self, x, y)
Test where the given (in client coords) point lies
  InheritAttributes(self)
This function is (or should be, in case of custom controls) called during window creation to intelligently set up the window visual attributes, that is the font and the foreground and background colours.
bool InheritsBackgroundColour(self)
  InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators.
  InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next time it is needed.
bool IsBeingDeleted(self)
Is the window in the process of being deleted?
bool IsEnabled(self)
Returns true if the window is enabled for input, false otherwise.
bool IsExposed(self, x, y, w, h)
Returns true if the given point or rectangle area has been exposed since the last repaint.
bool IsExposedPoint(self, pt)
Returns true if the given point or rectangle area has been exposed since the last repaint.
bool IsExposedRect(self, rect)
Returns true if the given point or rectangle area has been exposed since the last repaint.
bool IsRetained(self)
Returns true if the window is retained, false otherwise.
bool IsShown(self)
Returns true if the window is shown, false if it has been hidden.
bool IsTopLevel(self)
Returns true if the given window is a top-level one.
bool Layout(self)
Invokes the constraint-based layout algorithm or the sizer-based algorithm for this window.
bool LineDown(self)
This is just a wrapper for ScrollLines(1).
bool LineUp(self)
This is just a wrapper for ScrollLines(-1).
  Lower(self)
Lowers the window to the bottom of the window hierarchy.
  MakeModal(self, modal)
Disables all other windows in the application so that the user can only interact with this window.
  Move(self, pt, flags)
Moves the window to the given position.
  MoveAfterInTabOrder(self, win)
Moves this window in the tab navigation order after the specified sibling window.
  MoveBeforeInTabOrder(self, win)
Same as MoveAfterInTabOrder except that it inserts this window just before win instead of putting it right after it.
  MoveXY(self, x, y, flags)
Moves the window to the given position.
bool Navigate(self, flags)
Does keyboard navigation from this window to another, by sending a wx.NavigationKeyEvent.
int NewControlId()
Generate a control id for the controls which were not given one. (Static method)
int NextControlId(winid)
Get the id of the control following the one with the given autogenerated) id (Static method)
bool PageDown(self)
This is just a wrapper for ScrollPages(1).
bool PageUp(self)
This is just a wrapper for ScrollPages(-1).
EvtHandler PopEventHandler(self, deleteHandler)
Removes and returns the top-most event handler on the event handler stack.
bool PopupMenu(self, menu, pos)
Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu.
bool PopupMenuXY(self, menu, x, y)
Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu.
  PostCreate(self, pre)
Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method.
  PrepareDC(self, dc)
Call this function to prepare the device context for drawing a scrolled image.
int PrevControlId(winid)
Get the id of the control preceding the one with the given autogenerated) id (Static method)
  PushEventHandler(self, handler)
Pushes this event handler onto the event handler stack for the window.
  Raise(self)
Raises the window to the top of the window hierarchy.
  Refresh(self, eraseBackground, rect)
Mark the specified rectangle (or the whole window) as "dirty" so it will be repainted.
  RefreshRect(self, rect, eraseBackground)
Redraws the contents of the given rectangle: the area inside it will be repainted.
bool RegisterHotKey(self, hotkeyId, modifiers, keycode)
Registers a system wide hotkey.
  ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
  RemoveChild(self, child)
Removes a child window.
bool RemoveEventHandler(self, handler)
Find the given handler in the event handler chain and remove (but not delete) it from the event handler chain, return True if it was found and False otherwise (this also results in an assert failure so this function should only be called when the handler is supposed to be there.)
bool Reparent(self, newParent)
Reparents the window, i.e the window will be removed from its current parent window (e.g.
Point ScreenToClient(self, pt)
Converts from screen to client window coordinates.
(x,y) ScreenToClientXY(x, y)
Converts from screen to client window coordinates.
bool ScrollLines(self, lines)
If the platform and window class supports it, scrolls the window by the given number of lines down, if lines is positive, or up if lines is negative.
bool ScrollPages(self, pages)
If the platform and window class supports it, scrolls the window by the given number of pages down, if pages is positive, or up if pages is negative.
  ScrollWindow(self, dx, dy, rect)
Physically scrolls the pixels in the window and move child windows accordingly.
  SendSizeEvent(self)
  SetAcceleratorTable(self, accel)
Sets the accelerator table for this window.
  SetAutoLayout(self, autoLayout)
Determines whether the Layout function will be called automatically when the window is resized.
bool SetBackgroundColour(self, colour)
Sets the background colour of the window.
bool SetBackgroundStyle(self, style)
Returns the background style of the window.
  SetBestFittingSize(self, size)
A 'Smart' SetSize that will fill in default size components with the window's best size values.
  SetCaret(self, caret)
Sets the caret associated with the window.
  SetClientRect(self, rect)
This sets the size of the window client area in pixels.
  SetClientSize(self, size)
This sets the size of the window client area in pixels.
  SetClientSizeWH(self, width, height)
This sets the size of the window client area in pixels.
  SetConstraints(self, constraints)
Sets the window to have the given layout constraints.
  SetContainingSizer(self, sizer)
This normally does not need to be called by application code.
bool SetCursor(self, cursor)
Sets the window's cursor.
Window SetDefaultItem(self, child)
Set this child as default, return the old default.
  SetDimensions(self, x, y, width, height, sizeFlags)
Sets the position and size of the window in pixels.
  SetDropTarget(self, dropTarget)
Associates a drop target with this window.
  SetEventHandler(self, handler)
Sets the event handler for this window.
  SetExtraStyle(self, exStyle)
Sets the extra style bits for the window.
  SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
  SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action.
bool SetFont(self, font)
Sets the font for this window.
bool SetForegroundColour(self, colour)
Sets the foreground colour of the window.
  SetHelpText(self, text)
Sets the help text to be used as context-sensitive help for this window.
  SetHelpTextForId(self, text)
Associate this help text with all windows with the same id as this one.
  SetId(self, winid)
Sets the identifier of the window.
  SetLabel(self, label)
Set the text which the window shows in its label if applicable.
  SetMaxSize(self, maxSize)
A more convenient method than SetSizeHints for setting just the max size.
  SetMinSize(self, minSize)
A more convenient method than SetSizeHints for setting just the min size.
  SetName(self, name)
Sets the window's name.
  SetOwnBackgroundColour(self, colour)
  SetOwnFont(self, font)
  SetOwnForegroundColour(self, colour)
  SetPosition(self, pt, flags)
Moves the window to the given position.
  SetRect(self, rect, sizeFlags)
Sets the position and size of the window in pixels using a wx.Rect.
  SetScrollbar(self, orientation, position, thumbSize, range, refresh)
  SetScrollPos(self, orientation, pos, refresh)
Sets the position of one of the built-in scrollbars.
  SetSize(self, size)
Sets the size of the window in pixels.
  SetSizeHints(self, minW, minH, maxW, maxH, incW, incH)
Allows specification of minimum and maximum window sizes, and window size increments.
  SetSizeHintsSz(self, minSize, maxSize, incSize)
Allows specification of minimum and maximum window sizes, and window size increments.
  SetSizer(self, sizer, deleteOld)
Sets the window to have the given layout sizer.
  SetSizerAndFit(self, sizer, deleteOld)
The same as SetSizer, except it also sets the size hints for the window based on the sizer's minimum size.
  SetSizeWH(self, width, height)
Sets the size of the window in pixels.
  SetThemeEnabled(self, enableTheme)
code to draw the windows' background instead if its own background drawing code.
  SetTitle(self, title)
Sets the window's title.
  SetTmpDefaultItem(self, win)
Set this child as temporary default
  SetToolTip(self, tip)
Attach a tooltip to the window.
  SetToolTipString(self, tip)
Attach a tooltip to the window.
  SetValidator(self, validator)
Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type.
  SetVirtualSize(self, size)
Set the the virtual size of a window in pixels.
  SetVirtualSizeHints(self, minW, minH, maxW, maxH)
Allows specification of minimum and maximum virtual window sizes.
  SetVirtualSizeHintsSz(self, minSize, maxSize)
Allows specification of minimum and maximum virtual window sizes.
  SetVirtualSizeWH(self, w, h)
Set the the virtual size of a window in pixels.
  SetWindowStyle(self, style)
Sets the style of the window.
  SetWindowStyleFlag(self, style)
Sets the style of the window.
  SetWindowVariant(self, variant)
Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac.
bool ShouldInheritColours(self)
Return true from here to allow the colours of this window to be changed by InheritAttributes, returning false forbids inheriting them from the parent window.
bool Show(self, show)
Shows or hides the window.
  Thaw(self)
Reenables window updating after a previous call to Freeze.
bool TransferDataFromWindow(self)
Transfers values from child controls to data areas specified by their validators.
bool TransferDataToWindow(self)
Transfers values to child controls from data areas specified by their validators.
bool UnregisterHotKey(self, hotkeyId)
Unregisters a system wide hotkey.
  Update(self)
Calling this method immediately repaints the invalidated area of the window instead of waiting for the EVT_PAINT event to happen, (normally this would usually only happen when the flow of control returns to the event loop.) Notice that this function doesn't refresh the window and does nothing if the window has been already repainted.
  UpdateWindowUI(self, flags)
This function sends EVT_UPDATE_UI events to the window.
bool UseBgCol(self)
bool Validate(self)
Validates the current values of the child controls using their validators.
  WarpPointer(self, x, y)
Moves the pointer to the given position on the window.
    Inherited from EvtHandler
  AddPendingEvent(self, event)
  Bind(self, event, handler, source, id, id2)
Bind an event to an event handler.
  Connect(self, id, lastId, eventType, func)
bool Disconnect(self, id, lastId, eventType)
bool GetEvtHandlerEnabled(self)
EvtHandler GetNextHandler(self)
EvtHandler GetPreviousHandler(self)
bool ProcessEvent(self, event)
  ProcessPendingEvents(self)
  SetEvtHandlerEnabled(self, enabled)
  SetNextHandler(self, handler)
  SetPreviousHandler(self, handler)
  Unbind(self, event, source, id, id2)
Disconencts the event handler binding for event from self.
    Inherited from Object
String GetClassName(self)
Returns the class name of the C++ class using wxRTTI.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Instance Method Details

__init__(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=SP_3D, name=SplitterNameStr)
(Constructor)

Constructor. Creates and shows a SplitterWindow.

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

name
           (type=String)

Returns:
SplitterWindow
Overrides:
wx.Window.__init__

Create(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=SP_3D, name=SplitterNameStr)

Create the GUI part of the SplitterWindow for the 2-phase create.

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

name
           (type=String)

Returns:
bool
Overrides:
wx.Window.Create

GetBorderSize(self)

Gets the border size

Returns:
int

GetMinimumPaneSize(self)

Gets the minimum pane size in pixels.

Returns:
int

GetSashGravity(self)

Gets the sash gravity.

Returns:
double

See Also:

SetSashGravity

GetSashPosition(self)

Returns the surrent sash position.

Returns:
int

GetSashSize(self)

Gets the sash size

Returns:
int

GetSplitMode(self)

Gets the split mode

Returns:
int

GetWindow1(self)

Gets the only or left/top pane.

Returns:
Window

GetWindow2(self)

Gets the right/bottom pane.

Returns:
Window

Initialize(self, window)

Initializes the splitter window to have one pane. This should be called if you wish to initially view only a single pane in the splitter window. The child window is shown if it is currently hidden.

Parameters:
window
           (type=Window)

IsSplit(self)

Is the window split?

Returns:
bool

ReplaceWindow(self, winOld, winNew)

This function replaces one of the windows managed by the SplitterWindow with another one. It is in general better to use it instead of calling Unsplit() and then resplitting the window back because it will provoke much less flicker. It is valid to call this function whether the splitter has two windows or only one.

Both parameters should be non-None and winOld must specify one of the windows managed by the splitter. If the parameters are incorrect or the window couldn't be replaced, False is returned. Otherwise the function will return True, but please notice that it will not Destroy the replaced window and you may wish to do it yourself.

Parameters:
winOld
           (type=Window)

winNew
           (type=Window)

Returns:
bool

SashHitTest(self, x, y, tolerance=5)

Tests for x, y over the sash

Parameters:
x
           (type=int)

y
           (type=int)

tolerance
           (type=int)

Returns:
bool

SetBorderSize(self, width)

Sets the border size. Currently a NOP.

Parameters:
width
           (type=int)

SetMinimumPaneSize(self, min)

Sets the minimum pane size in pixels.

The default minimum pane size is zero, which means that either pane can be reduced to zero by dragging the sash, thus removing one of the panes. To prevent this behaviour (and veto out-of-range sash dragging), set a minimum size, for example 20 pixels. If the wx.SP_PERMIT_UNSPLIT style is used when a splitter window is created, the window may be unsplit even if minimum size is non-zero.

Parameters:
min
           (type=int)

SetSashGravity(self, gravity)

Set the sash gravity. Gravity is a floating-point factor between 0.0 and 1.0 which controls position of sash while resizing the wx.SplitterWindow. The gravity specifies how much the left/top window will grow while resizing.

Example values:

0.0 Only the bottom or right window is automaticaly resized.
0.5 Both windows grow equally.
1.0 Only left/top window grows.

The default value of sash gravity is 0.0. That value is compatible with the previous (before gravity was introduced) behaviour of the wx.SplitterWindow.

Parameters:
gravity
           (type=double)

SetSashPosition(self, position, redraw=True)

Sets the sash position, in pixels. If redraw is Ttrue then the panes are resized and the sash and border are redrawn.

Parameters:
position
           (type=int)

redraw
           (type=bool)

SetSashSize(self, width)

Sets the sash size.

Parameters:
width
           (type=int)

SetSplitMode(self, mode)

Sets the split mode. The mode can be wx.SPLIT_VERTICAL or wx.SPLIT_HORIZONTAL. This only sets the internal variable; does not update the display.

Parameters:
mode
           (type=int)

SizeWindows(self)

Resizes subwindows

SplitHorizontally(self, window1, window2, sashPosition=0)

Initializes the top and bottom panes of the splitter window. The child windows are shown if they are currently hidden.

Returns True if successful, False otherwise (the window was already split).

SplitHorizontally should be called if you wish to initially view two panes. It can also be called at any subsequent time, but the application should check that the window is not currently split using IsSplit.

Parameters:
window1 - The top pane.
           (type=Window)

window2 - The bottom pane.
           (type=Window)

sashPosition - The initial position of the sash. If this value is positive, it specifies the size of the upper pane. If it is negative, its absolute value gives the size of the lower pane. Finally, specify 0 (default) to choose the default position (half of the total window height).
           (type=int)

Returns:
bool

SplitVertically(self, window1, window2, sashPosition=0)

Initializes the left and right panes of the splitter window. The child windows are shown if they are currently hidden.

Returns True if successful, False otherwise (the window was already split).

SplitVertically should be called if you wish to initially view two panes. It can also be called at any subsequent time, but the application should check that the window is not currently split using IsSplit.

Parameters:
window1 - The left pane.
           (type=Window)

window2 - The right pane.
           (type=Window)

sashPosition - The initial position of the sash. If this value is positive, it specifies the size of the left pane. If it is negative, its absolute value gives the size of the right pane. Finally, specify 0 (default) to choose the default position (half of the total window width).
           (type=int)

Returns:
bool

Unsplit(self, toRemove=None)

Unsplits the window. Pass the pane to remove, or None to remove the right or bottom pane. Returns True if successful, False otherwise (the window was not split).

This function will not actually delete the pane being removed; it sends EVT_SPLITTER_UNSPLIT which can be handled for the desired behaviour. By default, the pane being removed is only hidden.

Parameters:
toRemove
           (type=Window)

Returns:
bool

UpdateSize(self)

Causes any pending sizing of the sash and child panes to take place immediately.

Such resizing normally takes place in idle time, in order to wait for layout to be completed. However, this can cause unacceptable flicker as the panes are resized after the window has been shown. To work around this, you can perform window layout (for example by sending a size event to the parent window), and then call this function, before showing the top-level window.


Static Method Details

GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)

Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.

The variant parameter is only relevant under Mac currently and is ignore under other platforms. Under Mac, it will change the size of the returned font. See wx.Window.SetWindowVariant for more about this.

Parameters:
variant
           (type=int)

Returns:
VisualAttributes

Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 16:57:17 2007 http://epydoc.sf.net