I want to give different color for differnt item of the spinner here is my code portion for spinner how can i solve it
<MySpinnerOption@SpinnerOption>:
color:.501,.756,.172, 1
background_normal:""
background_color:(.949,.976,.917, 1)
size_hint_y:None
pos_hint:{"center_x":.5,"center_y":.5}
Spinner:
pos_hint:{"center_x":.5,"center_y":.5}
background_normal:""
background_color:(.501,.756,.172, 1)
id:spinner_3
size_hint_y:None
size_hint_x:.4
height:50
text:'country'
values:root.country_name
on_text:root.updatePhone(spinner_3.text)
option_cls: Factory.get("MySpinnerOption")
<SpinnerOption>:
canvas.before:
Color:
rgba: [0, 0.3, 0, 0.95] # if root.state == "normal" else [0, 1, 1, 0.95]
RoundedRectangle:
radius: [5] * 4
pos: self.x + 1, self.y + 1
size: self.width - 2, self.height - 2
background_normal: 'graphics/blank.png'
background_down: 'graphics/blank.png'
<Spinner>:
canvas.before:
Color:
rgba: [0.1, 0.75, 0.1, 0.5] if root.state == "normal" else [0.5, 1, 1, 0.5]
RoundedRectangle:
radius: [5] * 4
pos: self.x + 1, self.y + 1
size: self.width - 2, self.height - 2
background_normal: 'graphics/blank.png'
background_down: 'graphics/blank.png'
--
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 post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/884611cb-db76-4ed6-ab8d-303477255cd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.