Home | Trees | Index | Help |
|
---|
Package wx :: Class SplitterWindow |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ | SplitterWindow
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.
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.
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 |
Constructor. |
bool |
Create the GUI part of the SplitterWindow for the 2-phase create. |
int |
Gets the border size |
VisualAttributes |
Get the default attributes for this class. (Static method) |
int |
Gets the minimum pane size in pixels. |
bool | GetNeedUpdating(self)
|
double |
Gets the sash gravity. |
int |
Returns the surrent sash position. |
int |
Gets the sash size |
int |
Gets the split mode |
Window |
Gets the only or left/top pane. |
Window |
Gets the right/bottom pane. |
Initializes the splitter window to have one pane. | |
bool |
Is the window split? |
bool |
This function replaces one of the windows managed by the SplitterWindow with another one. |
bool |
Tests for x, y over the sash |
Sets the border size. | |
Sets the minimum pane size in pixels. | |
SetNeedUpdating(self,
needUpdating)
| |
Set the sash gravity. | |
Sets the sash position, in pixels. | |
Sets the sash size. | |
Sets the split mode. | |
Resizes subwindows | |
bool |
Initializes the top and bottom panes of the splitter window. |
bool |
Initializes the left and right panes of the splitter window. |
bool |
Unsplits the window. |
Causes any pending sizing of the sash and child panes to take place immediately. |
Property Summary | |
---|---|
BorderSize : See GetBorderSize and SetBorderSize | |
MinimumPaneSize : See GetMinimumPaneSize and SetMinimumPaneSize | |
NeedUpdating : See GetNeedUpdating and SetNeedUpdating | |
SashGravity : See GetSashGravity and SetSashGravity | |
SashPosition : See GetSashPosition and SetSashPosition | |
SashSize : See GetSashSize and SetSashSize | |
SplitMode : See GetSplitMode and SetSplitMode | |
thisown : The membership flag | |
Window1 : See GetWindow1 | |
Window2 : See GetWindow2 |
Instance Method Details |
---|
__init__(self,
parent,
id=-1,
pos=DefaultPosition,
size=DefaultSize,
style=SP_3D,
name=SplitterNameStr)
|
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.
|
GetBorderSize(self)Gets the border size
|
GetMinimumPaneSize(self)Gets the minimum pane size in pixels.
|
GetSashGravity(self)Gets the sash gravity.
|
GetSashPosition(self)Returns the surrent sash position.
|
GetSashSize(self)Gets the sash size
|
GetSplitMode(self)Gets the split mode
|
GetWindow1(self)Gets the only or left/top pane.
|
GetWindow2(self)Gets the right/bottom pane.
|
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.
|
IsSplit(self)Is the window split?
|
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.
|
SashHitTest(self, x, y, tolerance=5)Tests for x, y over the sash
|
SetBorderSize(self, width)Sets the border size. Currently a NOP.
|
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.
|
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
Example values:
The default value of sash gravity is 0.0. That value is compatible
with the previous (before gravity was introduced) behaviour of the
|
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.
|
SetSashSize(self, width)Sets the sash size.
|
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.
|
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
|
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
|
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.
|
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
|
Property Details |
---|
BorderSizeSee
|
MinimumPaneSizeSee
|
NeedUpdatingSee
|
SashGravitySee
|
SashPositionSee
|
SashSizeSee
|
SplitModeSee
|
thisownThe membership flag |
Window1See
|
Window2See
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:12:35 2007 | http://epydoc.sf.net |