Bug: no way to set color of wx.SplitterWindow bar?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug: no way to set color of wx.SplitterWindow bar?

Edward K. Ream-3
It does not appear possible to specify the color of the splitter bar in a
wx.SplitterWindow, regardless of the width of the splitter bar, and
regardless of the background color of then entire splitter.  I would really
like a way to do this: it would add a lot to Leo's wx look, and it would
draw attention to the splitter bar.

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  [hidden email]
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------





Reply | Threaded
Open this post in threaded view
|

Re: Bug: no way to set color of wx.SplitterWindow bar?

Donn Ingle
> It does not appear possible to specify the color of the splitter bar in a
Far as I know, a lot of the appearance of things (colour, font sizes, etc)
is up to the underlying toolkit like GTK.
If your GTK theme controls those things, then you can go blue in the face,
but your panels and splitters will not :)

/d



Reply | Threaded
Open this post in threaded view
|

Re: Bug: no way to set color of wx.SplitterWindow bar?

Chris Mellon
In reply to this post by Edward K. Ream-3
On 12/15/06, Edward K. Ream <[hidden email]> wrote:
> It does not appear possible to specify the color of the splitter bar in a
> wx.SplitterWindow, regardless of the width of the splitter bar, and
> regardless of the background color of then entire splitter.  I would really
> like a way to do this: it would add a lot to Leo's wx look, and it would
> draw attention to the splitter bar.
>
> Edward

The graphical elements of the splitter bar are drawn via the
wxRenderer API, so that they have native look & feel. You can
implement your own renderer (it's not that hard) to draw them however
you want. Be wary of doing this on any platform except windows,
because everywhere else theres a standard splitter look & feel that
users will expect. Windows doesn't have a defined standard, and not
even a de facto one, so the Windows l&f for the splitter is somewhat
arbitrary.


Reply | Threaded
Open this post in threaded view
|

Re: Bug: no way to set color of wx.SplitterWindow bar?

Andrea Gavana
I perfectly agree with Chris. However, even on Windows, putting a
splitter bar coloured in red or magenta would be somewhat "shocking"
to the user. In any case, the splitter bar is a very very very small
part of the GUI itself. AFAIR, this is the first time I read about the
possibility of changing such a detail. I found however quite strange
that such a small detail would add "a lot" to Leo's look. I probably
wouldn't notice that change if I were a Leo user.
In any case, if you wish to change the splitter bar colour, you may
take a look and grab some ideas from my implementation of
FourWaySplitter here:

http://xoomer.alice.it/infinity77/eng/freeware.html#fourwaysplitter

It's a completely owner-drawn 4-ways splitter window.

Andrea.

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


Reply | Threaded
Open this post in threaded view
|

Re: Bug: no way to set color of wx.SplitterWindow bar?

Robin Dunn
In reply to this post by Edward K. Ream-3
Edward K. Ream wrote:
> It does not appear possible to specify the color of the splitter bar in a
> wx.SplitterWindow, regardless of the width of the splitter bar, and
> regardless of the background color of then entire splitter.  I would really
> like a way to do this: it would add a lot to Leo's wx look, and it would
> draw attention to the splitter bar.

The native platform's theme API is used to draw some things in wx,
including the splitter sash, so it will always use the platform default
LnF.  On the other hand, making a custom splitter is pretty easy.  See
wx.lib.splitter for one example.


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



Reply | Threaded
Open this post in threaded view
|

Re: Bug: no way to set color of wx.SplitterWindow bar?

Edward K. Ream-3
In reply to this post by Andrea Gavana
> FourWaySplitter [is] a completely owner-drawn 4-ways splitter window.

Many thanks for this pointer.  I'll study the code in detail.  It may be
just what Leo needs.

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  [hidden email]
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------