So i have just started using tkinter and i wanted to know if there was a way to exclude certain types of data types from the entry function. So for example if the Entry box said "a = ", then the user types in a number, let's say 5, "a = 5". Is there a way to only collect the 5 while using the get method?
Asked
Active
Viewed 29 times
1
-
1Do you want to PREVENT those extra characters, or just EXTRACT them from whatever they types? To PREVENT them, you need a validator. https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/entry-validation.html To EXTRACT them, it's simple text processing to pull out the digits. – Tim Roberts Nov 07 '21 at 19:04