0

I've a tkinter scale widget from 0 to 100 with a resolution of 1. Is it possible to bind digits to the scale such that when a user enters any number from 0 to 100, the value is reflected on the scale widget?

Edit 1: This question has been voted to close saying it is too broad. I don't know what more information is required. At least comment what more information is required. Anyway, I'm elaborating a little more.

I know how to bind a single key event to a function. But here, since it is scale widget, I need to bind 2 key events (not a single key). I don't know how to bind 2 key events. Also, there are 101 different combinations possible. Do I have to bind for each combination?

Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
  • 1
    Yes. Just make a tkinter Variable with `var=tk.IntVar()` and connect it to the Scale with `variable=var` argument. – Novel Sep 14 '19 at 17:29
  • How do I bind this variable to keyboard events? I know how to bind a single key to a function. I don't know how to bind a combination of any 2 digits to a function. How can I achieve that? – Nagabhushan S N Sep 15 '19 at 04:51

0 Answers0