Aug-09-2017, 06:35 PM
Aug-09-2017, 06:54 PM
Which graphics toolkit? tk? gtk? qt? wx? Something else?
Aug-09-2017, 07:05 PM
(Aug-09-2017, 06:54 PM)nilamo Wrote: [ -> ]Which graphics toolkit? tk? gtk? qt? wx? Something else?
graphics toolkit Tk
Aug-09-2017, 07:16 PM
What do you have so far? What errors are you getting?
Aug-09-2017, 07:48 PM
(Aug-09-2017, 07:16 PM)nilamo Wrote: [ -> ]What do you have so far? What errors are you getting?
I do not have any errors in code
I ask for an basic example to create it at the beginning
(Aug-09-2017, 07:48 PM)kostasalgo Wrote: [ -> ][quote='nilamo' pid='22586' dateline='1502306181']
What do you have so far? What errors are you getting?
I do not have any errors in code
I ask for an basic example to create it at the beginning
example
Ab=[]
for i in range(3):
Ab.append(input('Give a num='))
print (Ab)
Aug-09-2017, 08:21 PM
I'm not sure what importing a list of numbers means, but here's a simple example of how to have a click handler attached to a button:
import tkinter as tk class Items: def __init__(self, data): self.data = data def click(self): print(self.data) root = tk.Tk() things = Items(["spam", "eggs"]) button = tk.Button(root, text="Print the things", command=things.click) button.pack() root.mainloop()