Feb-01-2021, 03:16 AM
I'm working on making a GUI in tkinter and I have 5 entry boxes. I want each entry box to only accept input from certain devices, such as a scanner or a measurement device. I have tried searching the internet for a few days now, and nothing that I've found really touches on limiting input to only a specific device per entry box.
Basically, in entry boxes 1 and 2, I want to only be able to use a scanner to accept input, and not a keyboard. In entry box 5, I want it to accept input from a measuring device and not a scanner or keyboard. I also would want to make entry box 5 continuously updating (every time the measuring device gets a new measurement, it updates in the GUI) until a button is pressed and it would make the GUI entry static on the last measurement updated.
Is this possible? I don't even know where to start with something like this. I've seen a similar concept done in Java, with things like scanf, but nothing in Python.
I would imagine I would have to start by defining a new input entry, but, like I said earlier, I don't even know where to start. Any help at all would be greatly appreciated.
Here is a sample of one of my entry boxes:
Basically, in entry boxes 1 and 2, I want to only be able to use a scanner to accept input, and not a keyboard. In entry box 5, I want it to accept input from a measuring device and not a scanner or keyboard. I also would want to make entry box 5 continuously updating (every time the measuring device gets a new measurement, it updates in the GUI) until a button is pressed and it would make the GUI entry static on the last measurement updated.
Is this possible? I don't even know where to start with something like this. I've seen a similar concept done in Java, with things like scanf, but nothing in Python.
I would imagine I would have to start by defining a new input entry, but, like I said earlier, I don't even know where to start. Any help at all would be greatly appreciated.
Here is a sample of one of my entry boxes:
tube_verification_entry = tk.Entry(tube_verification_frame, bg='white') tube_verification_entry.place(relx=0.45, rely=0.1, relwidth=0.5, relheight=0.8)