Python Forum
[Tkinter] Get a range from GUI ? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: [Tkinter] Get a range from GUI ? (/thread-32077.html)



Get a range from GUI ? - water - Jan-19-2021

I want to make a widget like this:
[Image: 111.jpg]

Get a range from GUI via mouse(e.g. return (1, 3) or (16, 23)...), I try to use ttk.Scale(), but it can't set two sliders, which widget can do that?


RE: Get a range from GUI ? - Larz60+ - Jan-19-2021

which GUI package are you using?


RE: Get a range from GUI ? - deanhystad - Jan-19-2021

What GUI software?

Are you looking for a scale like widget with two thumbs? I know of no widget like that. If you want to use scale you could use two scale widgets and put them together in a frame. I think I would use a Spinbox instead.


RE: Get a range from GUI ? - water - Jan-19-2021

Yes, I already do that use two 'Scale' widget.
But if make two markers on same axis will more intuition than Spinbox, although it's image of idea. Smile

Capture from Audio editor:
[Image: 333.jpg]


RE: Get a range from GUI ? - water - Jan-19-2021

(Jan-19-2021, 07:49 PM)Larz60+ Wrote: which GUI package are you using?

It's the question, the image only captue from other software, widget not implement currently.


RE: Get a range from GUI ? - Larz60+ - Jan-20-2021

Quote:Larz60+ Wrote:
which GUI package are you using?

Quote:you responde with:
It's the question, the image only captue from other software, widget not implement currently.

Quote:But in previous post you respond to Deanhystad:
Yes, I already do that use two 'Scale' widget.

If that's the case, you must be using some graphics package, Which one??
for instance tkinter, Qt5, Kivy, wxpython or something else.


RE: Get a range from GUI ? - water - Jan-20-2021

Quote:If that's the case, you must be using some graphics package, Which one??
for instance tkinter, Qt5, Kivy, wxpython or something else.

I use two tkinter Scale to get value each, but not enough close the aim,
[Image: 333.jpg]

tkinter is my first option but not limited,
(because I grasp PyQt, Kivy, wxpython ... less than tkinter currently. Smile ,

tkinter seems can't implement this function, I looking for Kivy ...

By the way, can I upload image at this forum?


RE: Get a range from GUI ? - Larz60+ - Jan-20-2021

Quote:I use two tkinter Scale to get value each, but not enough close the aim,

tkinter was what I was looking for.
Kivy might do the trick, I haven't used it too much.

tkinter's not my favorite GUI package, but you should be able to modify the code to produce what you want with a couple of custom buttons. see:

Could you please show code, hard to help without.