I have created a login.py page using tkinter and I have created a connect database.py page also ,so my doubt is i have a button called login in connect database window , now the how to give argument such as if I click the login button the screen shd change to my login.py screen .....hope u understand my doubtt
PS : this is my first ques in stack overflow
CodePudding user response:
You should use multimodule system in python and import your module with your login window.
from login.py import logginWindowFunction
So you can use given functions from this file, for example:
Button['command'] = logginWindowFunction
Also you can import whole file:
import login.py as lg
Button['command'] = lg.logginWindowFunction
CodePudding user response:
tkinter buttons has command
keyword argument to add a functionality to your button , more info : https://www.tutorialspoint.com/python/tk_button.html
just add whatever function that change to the other screen when you login