Is there a way to change the background color of wx.Choice

Hi,

      I have

tried several ways in a fruitless effort to change the
background color of a wx.Choice control.

      I have

tried :

ClearBackground()

SetBackgroundColour()

      even

tried SetForegroundColour()

      Nothing

changes the background color.

      All I

trying to do is create a special disable color for one wx.Choice
control.

      Does

anyone know the proper way to change the color of a wx.Choice?

Johnf

you should refresh the window after change someting to the ui.

john fabiani` fabiani.john@gmail.com 于2018年12月7日周五 上午2:17写道:

···

Hi,

      I have

tried several ways in a fruitless effort to change the
background color of a wx.Choice control.

      I have

tried :

ClearBackground()

SetBackgroundColour()

      even

tried SetForegroundColour()

      Nothing

changes the background color.

      All I

trying to do is create a special disable color for one wx.Choice
control.

      Does

anyone know the proper way to change the color of a wx.Choice?

Johnf

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

I did try a refresh.

    But let ask you - are you able to change the

background color of a wx.Choice?

Johnf

···

On 12/06/2018 11:00 PM, jie chen wrote:

    you should refresh the window after change someting

to the ui.

john fabiani` <fabiani.john@gmail.com >
于2018年12月7日周五 上午2:17写道:

Hi,

              I

have tried several ways in a fruitless effort to
change the background color of a wx.Choice control.

              I

have tried :

ClearBackground()

SetBackgroundColour()

              even

tried SetForegroundColour()

              Nothing

changes the background color.

              All

I trying to do is create a special disable color for
one wx.Choice control.

              Does

anyone know the proper way to change the color of a
wx.Choice?

Johnf

      You received this message because you are subscribed to the

Google Groups “wxPython-users” group.

      To unsubscribe from this group and stop receiving emails from

it, send an email to wxpython-users+unsubscribe@googlegroups.com.

      For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

  You received this message because you are subscribed to the Google

Groups “wxPython-users” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxpython-users+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

the below is my try.

image.png

john fabiani` fabiani.john@gmail.com 于2018年12月7日周五 下午9:29写道:

···

I did try a refresh.

    But let ask you - are you able to change the

background color of a wx.Choice?

Johnf

On 12/06/2018 11:00 PM, jie chen wrote:

    you should refresh the window after change someting

to the ui.

john fabiani` <fabiani.john@gmail.com >
于2018年12月7日周五 上午2:17写道:

Hi,

              I

have tried several ways in a fruitless effort to
change the background color of a wx.Choice control.

              I

have tried :

ClearBackground()

SetBackgroundColour()

              even

tried SetForegroundColour()

              Nothing

changes the background color.

              All

I trying to do is create a special disable color for
one wx.Choice control.

              Does

anyone know the proper way to change the color of a
wx.Choice?

Johnf

      You received this message because you are subscribed to the

Google Groups “wxPython-users” group.

      To unsubscribe from this group and stop receiving emails from

it, send an email to wxpython-users+unsubscribe@googlegroups.com.

      For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

  You received this message because you are subscribed to the Google

Groups “wxPython-users” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxpython-users+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Thank you for your effort but you made me realize
I have mis-lead the group. I wasn’t making reference to the
dropdown list (yours is the green and black) but what appears to
be the blue on the pic. Just using the enabled = False does not
provide enough of a contrast (color difference) that the user
can tell that the control is disabled. My current thinking is
to hide the control (refresh the screen) so that no mistakes are
made as to which control is available to enter data. But of
course that will also mean the users will need extra training
since they will not see the controls.

Johnf

image.png

···

On 12/09/2018 07:15 PM, jie chen wrote:

the below is my try.

john fabiani` <fabiani.john@gmail.com >
于2018年12月7日周五 下午9:29写道:

I did try a refresh.

            But let ask you - are you able to change

the background color of a wx.Choice?

Johnf

          On

12/06/2018 11:00 PM, jie chen wrote:

            you should refresh the window after change

someting to the ui.

john fabiani` <fabiani.john@gmail.com >
于2018年12月7日周五 上午2:17写道:

Hi,

                      I have tried several ways in a

fruitless effort to change the background
color of a wx.Choice control.

I have tried :

ClearBackground()

SetBackgroundColour()

even tried SetForegroundColour()

                      Nothing changes the background

color.

                      All I trying to do is create a

special disable color for one wx.Choice
control.

                      Does anyone know the proper way to

change the color of a wx.Choice?

Johnf

              You received this message because you are subscribed

to the Google Groups “wxPython-users” group.

              To unsubscribe from this group and stop receiving

emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

              For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

          You received this message because you are subscribed to

the Google Groups “wxPython-users” group.

          To unsubscribe from this group and stop receiving emails

from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

          For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

      You received this message because you are subscribed to the

Google Groups “wxPython-users” group.

      To unsubscribe from this group and stop receiving emails from

it, send an email to wxpython-users+unsubscribe@googlegroups.com.

      For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

  You received this message because you are subscribed to the Google

Groups “wxPython-users” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxpython-users+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

Johnf,

Just an idea - You could always replace the actual control with a disabled text control the same size, (possibly with some appropriate text in), whenever the actual control needs to be disabled.
Not quite as easy as hiding it but you do get a visual marker for the users.

Steve

image.png

···

From: wxpython-users@googlegroups.com wxpython-users@googlegroups.com
On Behalf Of john fabiani`
Sent: 10 December 2018 14:48
To: wxpython-users@googlegroups.com
Subject: Re: [wxPython-users] Is there a way to change the background color of wx.Choice

Thank you for your effort but you made me realize I have mis-lead the group. I wasn’t making reference to the dropdown list (yours is the green and black) but what appears to be the blue on the pic. Just using the enabled
= False does not provide enough of a contrast (color difference) that the user can tell that the control is disabled. My current thinking is to hide the control (refresh the screen) so that no mistakes are made as to which control is available to enter data.
But of course that will also mean the users will need extra training since they will not see the controls.

Johnf

On 12/09/2018 07:15 PM, jie chen wrote:

the below is my try.

john fabiani` fabiani.john@gmail.com
于2018年12月7日周五
下午9:29写道:

I did try a refresh.

But let ask you - are you able to change the background color of a wx.Choice?

Johnf

On 12/06/2018 11:00 PM, jie chen wrote:

you should refresh the window after change someting to the ui.

john fabiani` fabiani.john@gmail.com
于2018年12月7日周五
上午2:17写道:

Hi,

I have tried several ways in a fruitless effort to change the background color of a wx.Choice control.

I have tried :

ClearBackground()

SetBackgroundColour()

even tried SetForegroundColour()

Nothing changes the background color.

All I trying to do is create a special disable color for one wx.Choice control.

Does anyone know the proper way to change the color of a wx.Choice?

Johnf


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout
.


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout
.


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout
.


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I like that thought - I’ll try it.

Thanks

Johnf

image.png

···

On 12/10/2018 09:45 PM, Steve Barnes
wrote:

Johnf,

        Just

an idea - You could always replace the actual control with a
disabled text control the same size, (possibly with some
appropriate text in), whenever the actual control needs to
be disabled. Not quite as easy as hiding it but you do get a
visual marker for the users.

Steve

From:

            john fabiani`

10 December 2018 14:48
Re: [wxPython-users] Is there a way to
change the background color of wx.Choice

        Thank you for your effort but

you made me realize I have mis-lead the group. I wasn’t
making reference to the dropdown list (yours is the green
and black) but what appears to be the blue on the pic. Just
using the enabled = False does not provide enough of a
contrast (color difference) that the user can tell that the
control is disabled. My current thinking is to hide the
control (refresh the screen) so that no mistakes are made as
to which control is available to enter data. But of course
that will also mean the users will need extra training since
they will not see the controls.

Johnf

On 12/09/2018 07:15 PM, jie chen wrote:

the below is my try.

john fabiani` <fabiani.john@gmail.com >
于2018年12月7日周五
下午9:29写道:

I did try a refresh.

                But let ask you - are

you able to change the background color of a
wx.Choice?

Johnf

                On 12/06/2018 11:00 PM, jie chen

wrote:

                  you should refresh the window

after change someting to the ui.

john fabiani` <fabiani.john@gmail.com >
于2018年12月7日周五
上午2:17写道:

Hi,

                        I

have tried several ways in a fruitless
effort to change the background color of a
wx.Choice control.

                        I

have tried :

ClearBackground()

SetBackgroundColour()

                        even

tried SetForegroundColour()

                        Nothing

changes the background color.

                        All

I trying to do is create a special disable
color for one wx.Choice control.

                        Does

anyone know the proper way to change the
color of a wx.Choice?

Johnf


You received this message because you are
subscribed to the Google Groups “wxPython-users”
group.
To unsubscribe from this group and stop
receiving emails from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout
.


You received this message because you are subscribed
to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving
emails from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout
.


You received this message because you are subscribed to
the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails
from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout
.


You received this message because you are subscribed to the
Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails
from it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the
Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from
it, send an email to
wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  You received this message because you are subscribed to the Google

Groups “wxPython-users” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxpython-users+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

wxpython-users@googlegroups.comwxpython-users@googlegroups.comOn Behalf Of
Sent:
**To:**wxpython-users@googlegroups.com
Subject:

        Just

an idea - You could always replace the actual control with a
disabled text control the same size, (possibly with some
appropriate text in), whenever the actual control needs to
be disabled.

or draw something over it to make it stand out the way you want.

-CHB

image.png

···

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov