Re: Button Color

Bruce Ravel <[email protected]> Mon, 4 Apr 2016 09:06:01 -0400
Newsgroups gmane.comp.lang.perl.wxperl
Organization National Institute of Standards and Technology
Message-ID <[email protected]>
On 04/03/2016 07:29 PM, James Lynes wrote:
> Hello All:
>
> Is there any way to change the background and/or foreground color of a
> Wx::Button?
>
> Thanks,
> James
>

The orange-y buttons on this page:

 
http://bruceravel.github.io/demeter/documents/Athena/intro.html#first-look-at-athena

are made like so:

   $button  = Wx::Button -> new($toolpanel, -1, 'E');
   $button -> SetBackgroundColour( Wx::Colour->new('#FCDD9F') );

This works for me on linux and Windows.

On the Mac, however, those same buttons are the default color, but
with a feint glow in the selected color around each button:

 
https://raw.githubusercontent.com/bruceravel/demeter/master/documentation/_images/athena_mac.png

I have never figured out how to fix this on the Mac.  (In fairness, I
haven't tried very hard.)

Cheers,
Bruce


-- 
  Bruce Ravel  ------------------------------------ [email protected]

  National Institute of Standards and Technology
  Synchrotron Science Group at NSLS-II
  Building 535A
  Upton NY, 11973

  Homepage:    http://bruceravel.github.io/home/
  Software:    https://github.com/bruceravel
  Demeter:     http://bruceravel.github.io/demeter/