wx.SplitterWindow styles doesn't work?

I can't get splitterwindows styles to get working. (Using winXP, Python 2.5.2
& wxpython 2.8.8.1)
And if you look example from the wxpython demos, you can see that the actual
3d effect of the sash is made because the windows on the left & right side
of the sash got style=wx.BORDER_SUNKEN, the sash itself is just made of one
color and have no effect.

When using wx.NO_BORDER with the both splitter windows, is it possible to
get some effect on the sash?

Here's my example code, you can change the splitterwindow style and see that
nothing happens.

import wx

class MyFrame(wx.Frame):
   def __init__(self):
      wx.Frame.__init__(self, None, id=-1, title="Splitter test",
size=(480,300))

      splitter_styles = [wx.SP_3D, #[0]
                         wx.SP_3DSASH, #[1]
                         wx.SP_3DBORDER, #[2]
                         wx.SP_BORDER, #[3]
                         wx.SP_NOBORDER, #[4]
                         wx.SP_NO_XP_THEME,]#[5]

      splitter_style = splitter_styles[0] #change this number

      splitter = wx.SplitterWindow(self, id=-1, style=splitter_style)

      left_panel = wx.Panel(splitter, -1, style=wx.NO_BORDER)
      right_panel = wx.Panel(splitter, -1, style=wx.NO_BORDER)
      left_panel.SetBackgroundColour("#FFFFFF")

      splitter.SplitVertically(left_panel, right_panel, sashPosition=0)

app = wx.PySimpleApp()
MyFrame().Show()
app.MainLoop()

···


View this message in context: http://www.nabble.com/wx.SplitterWindow-styles-doesn't-work--tp20084950p20084950.html
Sent from the wxPython-users mailing list archive at Nabble.com.

http://i37.tinypic.com/2gwsxm8.gif
Here's the screenshot of my example.

If only it would be possible to change sash color... :wink:

···


View this message in context: http://www.nabble.com/wx.SplitterWindow-styles-doesn't-work--tp20084950p20085040.html
Sent from the wxPython-users mailing list archive at Nabble.com.

Hi,

http://i37.tinypic.com/2gwsxm8.gif
Here's the screenshot of my example.

If only it would be possible to change sash color... :wink:

The sash colour and appearance on XP depend pretty much on how Windows
decides to render it on screen, and not on wxPython/wxWidgets. If you
wish to change the sash colour or other properties, I'd suggest you to
take a look at wx.lib.splitter.MultiSplitterWindow, which is pure
Python code and can be hacked as much as you want :smiley:

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Tue, Oct 21, 2008 at 8:41 AM, kewlar wrote:

kewlar wrote:

I can't get splitterwindows styles to get working. (Using winXP, Python 2.5.2
& wxpython 2.8.8.1)
And if you look example from the wxpython demos, you can see that the actual
3d effect of the sash is made because the windows on the left & right side
of the sash got style=wx.BORDER_SUNKEN, the sash itself is just made of one
color and have no effect.

At about the time that XP was released the wx.SplitterWindow was changed to use the system theme for drawing the sash. So now each platform draws it differently but each is consistent with native styles. On Windows that means that the sash itself will not have any borders and will rely on the widgets on either side to have some sort of border to help show the sash's position.

When using wx.NO_BORDER with the both splitter windows, is it possible to
get some effect on the sash?

Here's my example code, you can change the splitterwindow style and see that
nothing happens.

      splitter_styles = [wx.SP_3D, #[0]
                         wx.SP_3DSASH, #[1]
                         wx.SP_3DBORDER, #[2]
                         wx.SP_BORDER, #[3]
                         wx.SP_NOBORDER, #[4]
                         wx.SP_NO_XP_THEME,]#[5]

      splitter_style = splitter_styles[0] #change this number

Keep in mind that those styles are bit flags that are meant to be combined. If you use the style that turns off the themed drawing together with one of the 3D flags then I think you'll get what you are looking for. Try this: wx.SP_NO_XP_THEME | wx.SP_3D | wx.SP_LIVE_UPDATE

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!