Тёмный

Pop Up Dialog Boxes in Python GUI with tkinter - User Login Window Design 

Arul Xavier V M
Подписаться 1,8 тыс.
Просмотров 19 тыс.
50% 1

This video demonstrates, how to create pop up dialog boxes such as Message Box, Error Message Box, Warning Message Box and Question Dialog Box. Also, it demonstrates how to create user login window using python gui tkinter.

Опубликовано:

 

9 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@mirkovallius
@mirkovallius Год назад
#start by importing a messagebox (module) from the tkinter (module) from tkinter import * from tkinter import messagebox #create a window window = Tk() window.title('Login') window.geometry('400x150+50+50') #add textfields l1=Label(window, text='Username:', font=(14)) l2=Label(window, text='Password:', font=(14)) l1.grid(row=0, column=0, padx=5, pady=5) l2.grid(row=1, column=0, padx=5, pady=5) #get username and password username=StringVar() password=StringVar() t1=Entry(window, textvariable=username, font=(14)) t2=Entry(window, textvariable=password, font=(14), show='*') t1.grid(row=0, column=1) t2.grid(row=1, column=1) #add login and cancel buttons b1=Button(window, text='Login', font=(14)) b2=Button(window, text='Cancel', font=(14)) #action when login button is clicked def login(): if username.get()=='admin' and password.get()=='admin': messagebox.showinfo(title='Login status', message='You have logged in.') else: messagebox.showerror(title='Login error', message='Username/Password is incorrect.') b1=Button(window, command=login, text='Login', font=(14)) #action when cancel button is clicked def cancel(): status=messagebox.askyesno(title='Question', message='Do you want to close the window?') if status==True: window.destroy() else: messagebox.showwarning(title='Warning', message='Please login again!') b2=Button(window, command=cancel, text='Cancel', font=(14)) b1.grid(row=2, column=1, sticky=W) b2.grid(row=2, column=1, sticky=E) window.mainloop()
@inspidr6055
@inspidr6055 4 года назад
Thank you! :) you are amazing!
@arulxaviervm3187
@arulxaviervm3187 3 года назад
Thanks
@ShadyShawarma
@ShadyShawarma 3 года назад
Thanks for uploading this video, it helped me a lot.
@arulxaviervm3187
@arulxaviervm3187 3 года назад
Thank you
@musharafullah4898
@musharafullah4898 4 года назад
im witing for your reply and thanks in advance sir
@musharafullah4898
@musharafullah4898 4 года назад
its help ful sir i doing student managemt project and there i use multiple window and i face one problem there when i use pop message user entry from is located in second window when user missed some entry field and press the confirm button the pop message work good but its move to the first window which i dont want ...how can i fix that i want the pop message show but its still stay on second window.
@Nishiansel123
@Nishiansel123 3 года назад
Hi! Is it safe to ask for password using input and dialog box? Will it get stored anywhere after the code is run?
@arulxaviervm3187
@arulxaviervm3187 3 года назад
As you said, it is not safe and you need to use encryption function to deal with password kind of data. this video intended to demonstrate various types pop dialogs.
@Neonvarun
@Neonvarun 3 года назад
After closing the window the next program starts running how to stop it?
@dominik6661
@dominik6661 3 года назад
I got an error: TypeError: label() got an unexpected keyword argument 'text'. What to do now?
@arulxaviervm3187
@arulxaviervm3187 3 года назад
Check your import statement and ensure that you have typed correct format like this Label(window, text="some text")
@teapothoohohohohohohoohohohoho
@teapothoohohohohohohoohohohoho 2 года назад
@@empty6088 disliking is stupid always just find a error and try to fix it or ask for help if you cant
@krishnajagadeesh6307
@krishnajagadeesh6307 3 года назад
How to download the simple images
Далее
iPhone 16 - презентация Apple 2024
01:00
Просмотров 42 тыс.
ДОКАЗАЛ ЧТО НЕ КАБЛУК #shorts
00:30
Просмотров 998 тыс.
Modern Graphical User Interfaces in Python
11:12
Просмотров 1,5 млн
Secure Login System in Python
14:43
Просмотров 108 тыс.
Create A Login Screen In Python With Flet (Tutorial)
11:33
Simple Login Application - Tkinter Python
12:32
Просмотров 6 тыс.
Understanding tkinter events
13:03
Просмотров 12 тыс.
If __name__ == "__main__" for Python Developers
8:47
Просмотров 400 тыс.