+ 5

Tkinter

Does anyone knows how to write python programmes with tkinter? How?

5th Aug 2019, 8:33 AM
mysterious_coder
mysterious_coder - avatar
6 ответов
+ 5
Use any IDE that is not Sololearn Code Playground. Like IDLE or PyCharm
5th Aug 2019, 8:35 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 4
Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is most commonly used method. You can use any IDE like pycharm to write it.
5th Aug 2019, 12:15 PM
Noor ❤
Noor ❤ - avatar
+ 4
There are many books and tutorials, this one gives you the very basics https://www.geeksforgeeks.org/JUMP_LINK__&&__python__&&__JUMP_LINK-gui-tkinter/
7th Aug 2019, 3:40 AM
Tibor Santa
Tibor Santa - avatar
+ 1
heres a simple label changing gui from tkinter import * #import tkinter root = Tk() #root can be anything like win,window etc. label = Label(root, text="hi!") label.pack() #You have now put text into the window, Well done! def clicked() : #defining the click handeler label.configure(text="Button was clicked !") #Anytime you call this function your label gets configured! btn = Button(root, text="change text", command=clicked) #button (dont put () after your function) btn.pack() #Awsome! we have made a button that changes the text root.mainloop() #Done! You can find more online (I reccomend like for geeks tkinter tutorial) and dont use codeplayground for tkinter #Tkinter does not work on mobile :( My simple travel agency code: https://code.sololearn.com/cs3x3jZFaHg3/?ref=app Good luck with GUI!
14th Jun 2020, 9:40 PM
Gurseerit Singh Chahal ✓
Gurseerit Singh Chahal ✓ - avatar
0
From tkinter import * And then the code Mainloop()
29th Apr 2020, 4:17 AM
Aachouch Simomed
Aachouch Simomed - avatar
0
This gives u a basic window with a background and a title #imports all of the tk module From tkinter import * #makes a window, make sure to make the T capital Your_var = Tk() #creates the window Your_var.mainloop() #changes the title Your_var.title=(“your title”) #adds a background color Your_var.config(background=“yourcolor”) #Sololearn doesnt support tk, run it in replit.com
3rd Mar 2022, 7:35 PM
Chris
Chris - avatar