Learn Python tkinter GUI listboxes easy 📋

  Рет қаралды 21,932

Bro Code

Bro Code

Күн бұрын

Пікірлер: 38
@BroCodez
@BroCodez 4 жыл бұрын
# listbox = A listing of selectable text items within it's own container def submit(): food = [] for index in listbox.curselection(): food.insert(index,listbox.get(index)) print("You have ordered: ") for index in food: print(index) def add(): listbox.insert(listbox.size(),entryBox.get()) listbox.config(height=listbox.size()) def delete(): for index in reversed(listbox.curselection()): listbox.delete(index) listbox.config(height=listbox.size()) from tkinter import * window = Tk() listbox = Listbox(window, bg="#f7ffde", font=("Constantia",35), width=12, selectmode=MULTIPLE) listbox.pack() listbox.insert(1,"pizza") listbox.insert(2,"pasta") listbox.insert(3,"garlic bread") listbox.insert(4,"soup") listbox.insert(5,"salad") listbox.config(height=listbox.size()) entryBox = Entry(window) entryBox.pack() frame = Frame(window) frame.pack() submitButton = Button(frame,text="submit",command=submit) submitButton.pack(side=LEFT) addButton = Button(frame,text="add",command=add) addButton.pack(side=LEFT) deleteButton = Button(frame,text="delete",command=delete) deleteButton.pack(side=LEFT) window.mainloop()
@dumandanarnela.6831
@dumandanarnela.6831 2 жыл бұрын
how to show the deleted items and remove from the box at the same time
@davidcalebpaterson7101
@davidcalebpaterson7101 3 жыл бұрын
Best video in the whole KZbin. Not even kidding. Thanks a ton
@hydarhydar2338
@hydarhydar2338 15 күн бұрын
Well Well ❤ thank you for the very helpful tutorials
@jhassee
@jhassee Жыл бұрын
Best channel yet, this is the best pre-course material ever. This smokes everything except coursera but in ways still out does coursera
@toddlawrimore3577
@toddlawrimore3577 5 ай бұрын
Helpful and especially direct to the subject. I am a fan. Thank you.
@_zitsu_k
@_zitsu_k 7 ай бұрын
you are the GOAT of coding, love from earth 🌏
@_zitsu_k
@_zitsu_k 7 ай бұрын
how many centuries it takes to be like you bro?
@paulfernando8815
@paulfernando8815 6 ай бұрын
Nicely explained. But I did not see the usual comments added at the end of the code lines in this.
@_zitsu_k
@_zitsu_k 7 ай бұрын
please can you make a guidance video of how to get in freelancing with coding
@hamzazad5258
@hamzazad5258 6 ай бұрын
great video! loved coding along in this one
@KhoaNguyen-bk2kv
@KhoaNguyen-bk2kv 3 жыл бұрын
A useful video. Thanks bro.
@AzzRushman
@AzzRushman Жыл бұрын
If .size() returns the size of the list, how come it doesn't replace the latest entry's index when used in .insert()? Apparently I can use END for the first argument of .insert() to add a new entry at the end of the list without weirding myself out.
@nearo007
@nearo007 6 ай бұрын
this is one year later but basically: the list ["hot dog" , "pizza" ] has the size of 2 items but the index of the last item is actually 1 (because it starts at 0) so inserting the index 2 would be the 3rd item on the list
@itsminaaah
@itsminaaah 2 жыл бұрын
can somebody help me how can I put exception handling when user did not select anything from the listbox but did click the delete button?
@Complex2.0GameR
@Complex2.0GameR 8 ай бұрын
Your are best bro ....love from bangladesh
@googlegoogle1610
@googlegoogle1610 3 жыл бұрын
thank you for such a great tutorial :)
@mikemurphy1896
@mikemurphy1896 3 жыл бұрын
Fast, but really good. Thx
@kapibara2440
@kapibara2440 10 ай бұрын
Super video Bro! 🎉🎉
@JohnSmithZen
@JohnSmithZen Жыл бұрын
Is there any way to make the columns resizable by clicking and dragging on top box in a column? (like you can most other prorgrams' listboxes)
@sidtheepic1103
@sidtheepic1103 6 ай бұрын
Can someone explain the reversed thing, thats the only thing i find confusing.
@piotrkopcewicz5227
@piotrkopcewicz5227 Жыл бұрын
Great tutorial! :)
@monwil3296
@monwil3296 4 жыл бұрын
We're going to break it Bro 👍👌
@philtoa334
@philtoa334 3 жыл бұрын
Great vidéo.
@Data_Falcon
@Data_Falcon 5 ай бұрын
bro it is very helpfull
@truquichan
@truquichan Жыл бұрын
Great!
@binkyslife
@binkyslife Жыл бұрын
Thank you 😁👍👍👍👍
@zollkerrb8848
@zollkerrb8848 2 жыл бұрын
great show
@beingzero7541
@beingzero7541 2 жыл бұрын
Wow!!!!
@kambingterbang
@kambingterbang 4 ай бұрын
thanks!!!
@lw9954
@lw9954 2 жыл бұрын
Ty bro!
@EissaAlahdul
@EissaAlahdul 2 жыл бұрын
شكرا
@gustavoaponte1814
@gustavoaponte1814 Жыл бұрын
meow meow meow~!
@itsminaaah
@itsminaaah 2 жыл бұрын
can somebody help me how can I put exception handling when user did not select anything from the listbox but did click the delete button?
@itsminaaah
@itsminaaah 2 жыл бұрын
can somebody help me how can I put exception handling when user did not select anything from the listbox but did click the delete button?
@itsminaaah
@itsminaaah 2 жыл бұрын
can somebody help me how can I put exception handling when user did not select anything from the listbox but did click the delete button?
@itsminaaah
@itsminaaah 2 жыл бұрын
can somebody help me how can I put exception handling when user did not select anything from the listbox but did click the delete button?
@voibuicochauphitruongthanh14
@voibuicochauphitruongthanh14 2 жыл бұрын
try cutting the delete button then paste it in a try...except clause idk if it helps try: deleteButton = Button(window,text="delete",command=delete) deleteButton.pack() except Exception: print("your text here") you should ask in stack overflow btw
Learn Python tkinter GUI messageboxes easy 💭
13:19
Bro Code
Рет қаралды 18 М.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,6 МЛН
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 10 МЛН
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 1,8 МЛН
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
Learn Python tkinter GUI progress bars easy 📊
10:39
Bro Code
Рет қаралды 59 М.
Making a Game in Python with No Experience
5:57
Goodgis
Рет қаралды 1,7 МЛН
Add Scrollbars to List Boxes - Python Tkinter GUI Tutorial #62
20:19
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,6 МЛН
The tkinter combobox and  spinbox widgets
16:29
Atlas
Рет қаралды 6 М.
15 Python Libraries You Should Know About
14:54
ArjanCodes
Рет қаралды 394 М.
Tkinter Beginner Course - Python GUI Development
38:59
NeuralNine
Рет қаралды 542 М.
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 10 МЛН