Jump to content

Python GUI button

Enderg312

my button code isn't working it keeps saying syntax error how would I fix it?

b1 = Button(root, text="1", command=Lambda: button_click(1))

 

Link to comment
Share on other sites

Link to post
Share on other sites

I think you need to make a window before making a button. 

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, fpo said:

I think you need to make a window before making a button. 

that would be a semantic error

 

21 hours ago, Enderg312 said:

my button code isn't working it keeps saying syntax error how would I fix it?


b1 = Button(root, text="1", command=Lambda: button_click(1))

 

"Lambda" is not the same as "lambda"

ಠ_ಠ

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×