Teaching myself Python Day 1

Teaching myself Python Day 1

By mytechtrail | mytechtrail | 25 Jan 2020


I have decided to start by following a tutorial to learn how to display data in a window and the add various code to get data to display. I am following: https://likegeeks.com/python-gui-examples-tkinter-tutorial/

Here is the display from today's code which I will post below the picture.
351665157-46a5d1062626599fd745eebef3a95391a9981dcba40e6cff26c054d89b8beb2f.png


from tkinter import *

window =Tk()
window.title("Pylearn Day 1")
window.geometry('1024x768')
lbl = Label(window, text="hello", font=("Arial Bold", 50))
lbl.grid(column=10, row=10)
def clicked():
lbl.configure(text="Button 2 was clicked !!", font=("Arial Bold", 14))
button_1 = Button(window, text="Button 1", bg="orange", fg="red")
button_2 = Button(window, text="Button 2", fg="blue", command=clicked)
button_1.grid(column=1, row=0)
button_2.grid(column=2, row=9)

window.mainloop()

Short but sweet for today.


mytechtrail
mytechtrail

Old time maker, now into STEEM, Raspberry Pi and learning Python


mytechtrail
mytechtrail

Projects I am working on, Raspberry Pi, Python and Solar.

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.