Dot in a selected radiobutton with bg, fg specified disappears

前端 未结 1 891
忘了有多久
忘了有多久 2021-01-23 15:30

Beginner question: I\'m trying to change the colour of my GUI, particularly the radiobuttons. I need inverted colours, so black background, white text.

self.radi         


        
1条回答
  •  抹茶落季
    2021-01-23 16:19

    As far as I can tell, specifying the foreground (presumably for the text) also sets the selected "dot color". You can set the selectcolor attribute of the element to color the "background" of the radiobutton so that you can see the white dot.

    For example, selectcolor='red' in Windows:

    win-red

    Be aware that the manpage indicates that coloring all radio buttons with selectcolor (instead of only the selected button) may be Windows-only:

    Under Windows, this color is used as the background for the indicator regardless of the select state.

    That being said, I got the same effect in linux under Python 2.7 and 3.3:

    linux-red

    I just used red to distinguish the part of the widget that selectcolor affected, you'd probably want selectcolor='black' or something a bit lighter to show the depression selectcolor='#222222' (below):

    win-dark

    0 讨论(0)
提交回复
热议问题