Here are 2 options, these will change the color of all of the elements in the drop down to the same color. If you want each of the buttons to be different colors, use a DropDown.
Option 1: Redefine the attributes of the Button class to be the color you want. The downside of this approach is that it will change the color of all of the buttons in your application. If you do want to change the color of all of your buttons, this is the way to go.
<Button>
-background_color: [1, 0, 0, 1]
-background_normal: ''
BoxLayout:
orientation: 'vertical'
Spinner:
size_hint_y: .1
text_autoupdate: True
values: [str(x) for x in range(8)]
Label:
text: 'Blank'
size_hint_y: .9
Alternatively you can create a new Option class for the elements that drop down from the spinner, and change the color of the spinner. In the option below, I created a class BlueButton.
<BlueButton@Button>
background_color: [0, 0, 1, 1]
background_normal: '' # You can put the name of a file to use as a button image...
size_hint_y: None
size_y: '48dp'
BoxLayout:
orientation: 'vertical'
Spinner:
size_hint_y: .1
background_color: [0, 0, 1, 1]
background_normal: ''
text_autoupdate: True
values: [str(x) for x in range(8)]
option_cls: 'BlueButton'
Label:
text: 'Blank'
size_hint_y: .9
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d8fdd102-94b0-4991-8060-f021d3a6aee5%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.