How to make a button with Python

How to make a button with Python

By SlashReal | Coding_tuts | 22 Mar 2023


#If you have read the simple GUI tutorial 
def mybutton_Clicked():

       print('Button Clicked

myButton = ttk.Button(root, text='My Button', command= myButton_Clicked)

myButton.pack(ipadx=10, ipady=30, expand=True)

How do you rate this article?

0



Coding_tuts
Coding_tuts

Programming tutorials

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.

Page not displaying correctly?