Interface.py update
This commit is contained in:
parent
92afe7725b
commit
dd45973171
43
interface.py
43
interface.py
|
@ -1,25 +1,40 @@
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
|
|
||||||
class Application(tk.Frame):
|
class Interface(tk.Frame):
|
||||||
def __init__(self, master=None):
|
def __init__(self, master=None):
|
||||||
super().__init__(master)
|
super().__init__(master)
|
||||||
self.master = master
|
self.master = master
|
||||||
self.pack()
|
|
||||||
self.create_widgets()
|
self.create_widgets()
|
||||||
|
|
||||||
def create_widgets(self):
|
def process(self):
|
||||||
Frame1 = tk.Frame(self, borderwidth=2, relief="groove")
|
print(self.simulate.get())
|
||||||
Frame1.pack(side="left", padx=330, pady=330)
|
|
||||||
nom = tk.Label(self, text = 'Votre nom :')
|
def create_widgets(self):
|
||||||
reponse = tk.Entry(self)
|
# inputs.config(bd=4,bg="blue")
|
||||||
valeur = tk.Button(self, text =' Valider', command=self.repondre)
|
# inputs.pack()
|
||||||
reponse.pack()
|
#
|
||||||
valeur.pack()
|
tk.Label(self.master, padx=10,text="Youtube URL",bg="red").grid(row=0)
|
||||||
|
tk.Label(self.master, padx=10,text="Folder").grid(row=1)
|
||||||
|
tk.Label(self.master, padx=10,text="Podcast website root").grid(row=2)
|
||||||
|
|
||||||
|
tk.Entry(self.master,width=70).grid(row=0, column=1,columnspan='8')
|
||||||
|
tk.Entry(self.master,width=70).grid(row=1, column=1,columnspan='8')
|
||||||
|
tk.Entry(self.master,width=70).grid(row=2, column=1,columnspan='8')
|
||||||
|
|
||||||
|
|
||||||
|
self.simulate = tk.IntVar()
|
||||||
|
tk.Checkbutton(self.master, text="simulate", variable=self.simulate
|
||||||
|
).grid(row=3,column=1,sticky='WE')
|
||||||
|
|
||||||
|
|
||||||
|
tk.Button(self.master,text='Interrupt').grid(row=4,column=7,sticky='WE')
|
||||||
|
tk.Button(self.master,text='Process', command =
|
||||||
|
self.process).grid(row=4,column=8,sticky='WE')
|
||||||
|
|
||||||
def repondre():
|
|
||||||
print("reponse")
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
root = tk.Tk()
|
root = tk.Tk() #create window
|
||||||
app = Application(master=root)
|
root.title("Ydl - Youtube downloader")
|
||||||
|
|
||||||
|
app = Interface(master=root) #create all components inside the window
|
||||||
app.mainloop()
|
app.mainloop()
|
||||||
|
|
Loading…
Reference in New Issue