Skip to content Skip to sidebar Skip to footer

Tkinter Widget Interface Interactive Button

I am very new to interactive python programming so please bear with me. I am using PyCharm with Python 3.3. I am attempting to build the following: I want to generate an a functio

Solution 1:

You cannot mix a GUI with input. To get the values from the entry widgets you need to do s.get() and dataf.get(). However, before you do that you need to remove the call to pack when creating the widgets, and move it to a separate statement. The reason is that pack returns None, so at the moment dataf and s are None. You also need to save references to these widgets as class attributes.

def text_scan(...):
    dataf_value = self.dataf.get()
    ...
...
self.dataf = Entry(...)
self.dataf.pack(...)
...

Post a Comment for "Tkinter Widget Interface Interactive Button"