Functions with Parameters with Tkinter GUI buttons - Tkinter tutorial Python 3.4 p. 3

preview_player
Показать описание

In this Tkinter with Python 3 tutorial video, we cover how to not only pass functions as commands for our buttons, but also pass parameters through those functions using lambda.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Рекомендации по теме
Комментарии
Автор

Thank you so much for all the hard work and effort. I'm learning a lot with you. Too bad to see several people use your videos and then take credit of your work.

alexandregagne
Автор

man i didnt understand what was the issue with lamda but i cant believe how much u helped me, thanks man

DanielMejia
Автор

Hopefully this class stuff will start to make more sense as I go through the GUI tutorials, but so far you have had some of the best tutorials on youtube! Keep it up man!

Kazutadashi
Автор

Usted es el mejor!, no se imagina como tuve de problemas con esto. Estupendo gracias!

juanjosegdoj
Автор

I am seriously envious of your typing skills! 😎

joedempseysr.
Автор

this is exactly what I needed! lambda is the king, thank you ;)

lukasz
Автор

Great concise information explaining a lot of the convention in an easily understandable way.  Great work, thank you much.

Kyurnmakes
Автор

I'm only coming across this now but you are helping me a ton. Thank you so much!

michaelpereira
Автор

Excellent! Answered a question I had on callbacks with parameters 😀. Thanks!

kensyootoob
Автор

I want to pass multiple variables through the quick function that lambda creates, what should I do?

mohfocus
Автор

Just wondering how I can pass variables/parameters between classes or, if that topic is in one of the videos further down the line, which video it appears in? Thanks!

mittromney
Автор

This is brilliant!!! Has helped me no end, thanks

leebrett
Автор

This video is very helpfull for desktop application for biggners

rohitchaube
Автор

form a class i have to check some values in Login then if it returns true then i want to move to another frame but i cannot use the variables here is the snippet of the code

class Login(tk.Frame):
def __init__(self, parant, controller):

tk.Frame.__init__(self, parant)
self.un= tk.Entry(self, textvariable=StringVar())
self.un.grid(row=3, column=2)
self.pw = tk.Entry(self, textvariable=StringVar())
self.pw.grid(row=4, column=2)

self.butsavedata = ttk.Button(self, text='Login', width=10, command=lambda:controller.show_frame(login))
self.butsavedata.grid(row=7, column=0)

class login(tk.Frame):
def __init__(self, parant, controller):
tk.Frame.__init__(self, parant)
loglist=[self.un.get(), self.pw.get()]
x=Auth.main(loglist)
if x:
self.butsavedata.destroy()
self.butquit = ttk.Button(self, text='Continue', width=10, command=lambda:controller.show_frame(hotel))

amanaoe
Автор

is it possible to design a code to get a new frame by clicking on the button("visit page 1") which will get the values of the same page .
for eg. a restaurant program after giving a total a button is provided in a frame as bill, and on clicking it you will get the exact bill that is printed on the previous frame .and the new frame includes bill paid message, , , , ..., , ., .., , . so basically i want to know hot to get same arguments on a new frame.

aryanthakur
Автор

Great tutorial! thanks a lot. How can i change the size of each window? how can i add a menu bar tu first page?

sinuheso
Автор

why did we take container ? does it means that container is a frame and all other pages are loaded as frames in this container frame.?

akshatsharma
Автор

Can anyone please tell me which video he goes into threading with this Tkinter application?

kaden
Автор

Thanks, your videos are very helpful. Someone showed me the "partial" function you can use by importing "partial" from "functools":
from functools import partial
then in your mainloop:
button1 = Button(topFrame, text="---", command=partial(---, ---))
maybe you will cover this in a later video, but is "lamda" doing the same thing as "partial"?

underwaterguitar
Автор

Do you have a video were you make. Box and the player can't walk into it or it activates something

AncientEntity
join shbcf.ru