Changing the appearance of the splitter

A number of style flags control the onscreen appearance of the splitter window. Note that since the splitter attempts to draw the sash in a manner that blends with the native platform controls, not all of the style flags listed will affect all systems. Table 8.9 describes the available flags.

As we'll see in the next section, you can also change the display of the splitter from your application, either in response to user action or on your own whim.

Table 8.9 Style flags for the splitter window

Style

Description

wx.SP_3D

Draw the border and sash with a 3D effect. This is the default style.

wx.SP_3DBORDER

Draws the border in a 3D style, but not the sash.

wx.SP_3DSASH

Draws the sash in a 3D style, but not the border.

wx.SP_BORDER

Draws a non-3D border around the window.

wx.SP_LIVE_UPDATE

Changes the default behavior for responding to a sash move. If this flag is not set, a line is drawn to indicate the new sash position while the user drags the sash. The sub-window sizes are not actually updated until the sash drag ends. If this flag is set, then the sub-windows are continually resized, repositioned, and redrawn as the sash is dragged.

wx.SP_NOBORDER

Does not draw any border at all.

wx.SP_NO_XP_THEME

Under Windows XP systems, does not use the XP theme for the sash, giving the window a more classic windows look.

wx.SP_PERMIT_UNSPLIT

If set, the window can always be unsplit. If not set, you can prevent the window from being unsplit by setting the minimum pane size greater than zero.

Was this article helpful?

0 0

Post a comment