Chnage slider color by value of it.

134 views
Skip to first unread message

Mart1

unread,
Nov 10, 2019, 11:04:11 AM11/10/19
to Kivy users support
Hi, I would like to change the color of my slider by the value of it.

slider_color.PNG

By using "value_track_color" I already have another color than the original one as you can see above.
I want to be able to changne the color of it by the value of my cursor.
For example blue color until temperature = 10 and then red color starting from 10.

Is it possible ?
If yes I want to know if there is something like "circular slider" and not a horizontal one as usual.

Thanks guys ;)

Elliot Garbus

unread,
Nov 10, 2019, 11:39:04 AM11/10/19
to kivy-...@googlegroups.com

You will need to create you own widget.

Use an image with the desired gradient as a background, and reveal more as the slider moves.

Look a the graphics instructions and canvas to draw the elements.

 

https://kivy.org/doc/stable/api-kivy.graphics.html?highlight=graphics#module-kivy.graphics

https://kivy.org/doc/stable/api-kivy.graphics.instructions.html?highlight=canvas

 

I created the ‘CircleKnobs’ I used in this app.

https://youtu.be/rrsdgSgkMlY

 

 

From: Mart1
Sent: Sunday, November 10, 2019 9:04 AM
To: Kivy users support
Subject: [kivy-users] Chnage slider color by value of it.

 

Hi, I would like to change the color of my slider by the value of it.

 

By using "value_track_color" I already have another color than the original one as you can see above.

I want to be able to changne the color of it by the value of my cursor.

For example blue color until temperature = 10 and then red color starting from 10.

 

Is it possible ?

If yes I want to know if there is something like "circular slider" and not a horizontal one as usual.

 

Thanks guys ;)

--
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/e8edb901-49ff-44a9-a6cc-badaacdc4a20%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages