▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My TH-cam Channel: bit.ly/2UFLKgj bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
thank for making these things so easy. for someone who doesnt work with these all the time you videos are gold to hit the ground and make something cool.🙏
Hello John, I am bald, like you, and I always bump somehow my head, which is very often leaving traces :) We, bald headed people, suffer a lot from objects that always seem to hang where they should not be :))) I enjoy this video about listboxes and doing stuff with them. Thank you!!!
Hey John, Thanks a ton for all the Tkinter Video man! I used almost every widget from your videos for my personal project, thanks again :) I've added your YT list to my list for reference. I just have a small request, could you please try to make a video on how to play around with 'window' sizes and how to move widgets to center (even after maximizing the entire window) and how to make the window full screen by default. Thanks much again 👍
Loving these videos, John! Could you do a tutorial on how to save and display images in a listbox on Tkinter? For example: using a dialog box I select 5 jpg or png files and have them all appear in the listbox as 'thumbnails'. Thanks!
get anchor would work if used in a function then later on called, but in case print(l.get(anchor)) was just written at the end the code would not print every time I select and anchor any idea why?
Is there any way to make the columns resizable by clicking and dragging on the edge of the top box in a column? (like you can most other prorgrams' listboxes)
thank you so much for those tutorials. it helps a lot. i wonder if there is a way to return the results into a variable, not only to print them into the tkinter screen. i've looked everywhere and didnt find. can you help me please???
Hello sir(Jhon elder).You are my favorite teacher in teaching GUI Development.Thank you. I've seen every video on GUI development in ur utube channel and I am inspired to build a project. I am currently working on a project and I encountered a problem.I want a table to show the result (marks of each subject)of a class.As tkinter has no Table widget,so I tried using the Grid geometry and scrollbar but the text is shrinking and overlapping with increase in number of students(rows).could you please help me with this?
Can you recommend a video or anything that shows how to take a list box selection, then assign that list box selection to a variable that can be used? I am probably on my 200th video or document... For example, if I select cat from the list box, I want cat to be equal to a variable in the program that I can later use. Thanks.
Suppose I want to put a list of numbers thru the app as user input. How do it do it ? For example say I want to input a list of numbers ( from a sensor for example) and want to press buttons to know max, min, median, etc of that input data. Is there a way to do it?
U deleted items from the listbox but not from the list, when you re-run the program, the items are there again. How do we delete an item from the listbox and the list simultaneously so it does not re-appear when we re-run? I ask because I'm bringing in songs from a text file for a music player project. When the user deletes a song from the listbox (his Playlist) , I want it to delete from the text file as well. I can figure it out if you point me in the right direction. Thank you sir!
You don't. Unless the data is coming from a database (and then you can delete it), it will always be there when you re-run the program...it's hard coded there. In your case, you'd need to delete them from the text file.
@@Codemycom that's easier said than done. How do I know which item the user deleted from the listbox? Is there a way to check which items are in the listbox by index maybe? For example, listbox[0]?
Did you ever make a video where you use listboxes with multiple selections? I followed this video and it worked great but once I added selectmode=MULTIPLE, the get ANCHOR doesn't seem to work anymore.
@@Codemycom I've not been able to find it but I found some good info on stackoverflow to fix my issue. Thanks for these videos. They're great. Just about to watch the one about adding Scrollbars to List Boxes.
hi john i need a GUI like eclipse tool left side panel .. that means if i click a folder it list all the directory in the path and each directory has a files it s also listed seperately
Sir what is the best option(widget) to fetch all business transactions on that widget and print on a proper sequence withouy any irregularities and i want both the cursors i.e x and y? As i tried with l tried list box but annoying alot as there shoud be grids in it. How to make easy this situation if there is any grid widget who supports x and y cursors? Thanks alot
@@Codemycom Sir i meant, how it could be possible to fetch all mysql data on a widget which could be easily managed grid wise e.g 00 , 01, 02, 03, and so on like we normally managed on frame or simple normal root windows. But the problem on the normal window or frame , is that we can't use vertical cursor or horizontal cursor in a case if we have hundreds of records. I tried with listbox and cursor but on listbox we can't put data grid wise and therefore we use lots of \t and still its creating problems. can you please tell me how to handle this situation or any other widget which could handles hundreds of records grid wise? thanks
Hai sir i would like to ask how to separate the data which is selected from the database and insert into the listbox... For me.. It look like 1 pen 20... 2 book 30... I want to look like... Pen,20 or any separation
@@Codemycom I show a table with four ListBoxes, my problem is that when selecting any item from any listbox I want the others to look as if they are selected "illuminated"
while clicking the delete button, it doesn't delete the highlighted item, instead it deletes the item below. Pls help :) from tkinter import* root=Tk() root.title("Listbox") root.geometry("400x400") #Listbox list1=Listbox(root) list1.pack(pady=15) #add item to listbox list1.insert(END,"pink") list1.insert(END,"red") list1.insert(3,"blue") #add list of items mylist=["purple","teal","white"] for item in mylist: list1.insert(END,item) def delete(): list1.delete(ANCHOR) mybutton=Button(root,text="delete",command=delete) mybutton.pack(pady=10)
if i select any item from listbox then it can access all selected options data . for ex. i select any .csv file from csv file names listbox then it access all data of .csv file. It is possible or not ?
I'm getting an error : TypeError: 'str' object cannot be interpreted as an integer. My list consists of strings. I tried END and "end" but still the same error. Any idea why ?
Is there a way to reverse the listbox so when an item gets added its added to the bottom of it? and then gets pushed upwards for every new item added. If that makes sense. :) Like this: First: ________ Item 1 ________ Then: ________ Item 1 Item 2 Item 3 ________
I think my comments are being deleted as spam because I'm replying to someone with an URL as a name lol. May want to look into that. Anyway, it was a response to 5:36. It has nothing to do with operating system
Brother I wish if you do a tutorial for building e-commerce website using Django and saleor.io or you suggest another method for building e-commerce website using Django. I personally do not like Wordpress
@@Codemycom You typed the keyword global for my_label and I'm trying to learn Python. I don't understand why you typed the word global. I think it would work just the same without the keyword global so I asked why you typed it. I haven't learnt a lot from your reply.
▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My TH-cam Channel:
bit.ly/2UFLKgj bit.ly/2IGzvOR
▶️ See More At: ✅ Join My Facebook Group:
Codemy.com bit.ly/2GFmOBz
▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
Good Morning, Sir can you help us by preparing a video on embed live graph in Tkinter using CSV file and without using CSV file
This deserves more views brilliant videos.
Thanks! Tell your friends ;-)
thank for making these things so easy. for someone who doesnt work with these all the time you videos are gold to hit the ground and make something cool.🙏
Glad you're enjoying them!
Just.. thank you for everything, John! I used to hate tkinter, but with your help.. i kind of like it!
Very Welcome!
Yo I watch and re-watch your videos. Awesome job! I only wish to be as skilled as you! Each video I watch I learn something new. Keep them coming!
Thanks!
Smashed the Like Button! Thanks man, your channel has helped me do something I never thought I would have been able to. You're the best!
Very glad to hear it!
Thank you for this series in usual. You saved my project. Thx
You're very welcome! Glad you enjoyed the videos!
Hello John, I am bald, like you, and I always bump somehow my head, which is very often leaving traces :)
We, bald headed people, suffer a lot from objects that always seem to hang where they should not be :)))
I enjoy this video about listboxes and doing stuff with them. Thank you!!!
Ha, I just hit my head on something yesterday lol
Hey John, Thanks a ton for all the Tkinter Video man! I used almost every widget from your videos for my personal project, thanks again :) I've added your YT list to my list for reference.
I just have a small request, could you please try to make a video on how to play around with 'window' sizes and how to move widgets to center (even after maximizing the entire window) and how to make the window full screen by default.
Thanks much again 👍
Yeah i need to do some videos on sizing...
Thank you for such an awesome tutorial!, I hope you really get more than your current amount of subscribers as you deserve more!
Thanks, tell your friends ;-)
Very clear explanation. Thank you
Welcome!
Thank you ever so much for your tutorials much appreciated
Thanks for watching!
Loving these videos, John! Could you do a tutorial on how to save and display images in a listbox on Tkinter? For example: using a dialog box I select 5 jpg or png files and have them all appear in the listbox as 'thumbnails'. Thanks!
Interesting idea, can you display images in a listbox?
You read my thoughts
Very cool. Thanks for sharing!
This is very helpful , thankyou john
Glad You're enjoying it!
hello, thanks for the video. How would you create a numbered list where the number auto-populates as you type the next line?
I don't have any videos on that
hello teacher I have a question in minute 10:35 __ why you should write global ((my_label))?
get anchor would work if used in a function then later on called, but in case print(l.get(anchor)) was just written at the end the code would not print every time I select and anchor any idea why?
Is there any way to make the columns resizable by clicking and dragging on the edge of the top box in a column? (like you can most other prorgrams' listboxes)
Would u plz show how to bind an event listener to the listbox to automatically detect the selected item?
thank you so much for those tutorials. it helps a lot. i wonder if there is a way to return the results into a variable, not only to print them into the tkinter screen. i've looked everywhere and didnt find. can you help me please???
pretty sure I have videos on that in the playlist...
@@Codemycom thank you
I will check 🙏
Hello sir(Jhon elder).You are my favorite teacher in teaching GUI Development.Thank you. I've seen every video on GUI development in ur utube channel and I am inspired to build a project.
I am currently working on a project and I encountered a problem.I want a table to show the result (marks of each subject)of a class.As tkinter has no Table widget,so I tried using the Grid geometry and scrollbar but the text is shrinking and overlapping with increase in number of students(rows).could you please help me with this?
Sorry I can't know what's going on...you'll have to just dig thru and figure it out :-)
@@Codemycom thanks for your response
Hey John, amazing tuts. You earned a subscriber. Quick question, how do you update listbox in a thread?
In a thread?
@@Codemycom Talking about concurrent programming but never mine I got it figure it out
@@aimannabil6447 Gotcha
Thank you brother !
You are very welcome
Hello!! is it possible to display a second list boxes by selecting a value in a first list boxes?
of course. I have videos on dependent list boxes
Can you recommend a video or anything that shows how to take a list box selection, then assign that list box selection to a variable that can be used? I am probably on my 200th video or document... For example, if I select cat from the list box, I want cat to be equal to a variable in the program that I can later use. Thanks.
This video shows you how to do that. 12:31 ish line 26 of the code. Just assign my_listbox.get(ANCHOR) to a variable
@@Codemycom Thank you, this helps. Saw this video earlier, but I must have missed the connections. Great series btw. Thanks.
Suppose I want to put a list of numbers thru the app as user input. How do it do it ? For example say I want to input a list of numbers ( from a sensor for example) and want to press buttons to know max, min, median, etc of that input data. Is there a way to do it?
Sure, that's basic functionality...I'd start at the beginning of my tkinter playlist and just watch for a while to learn the basics of tkinter
feed the algorithm! great vid
thank you thank you!
U deleted items from the listbox but not from the list, when you re-run the program, the items are there again. How do we delete an item from the listbox and the list simultaneously so it does not re-appear when we re-run? I ask because I'm bringing in songs from a text file for a music player project. When the user deletes a song from the listbox (his Playlist) , I want it to delete from the text file as well. I can figure it out if you point me in the right direction. Thank you sir!
You don't. Unless the data is coming from a database (and then you can delete it), it will always be there when you re-run the program...it's hard coded there. In your case, you'd need to delete them from the text file.
@@Codemycom that's easier said than done. How do I know which item the user deleted from the listbox? Is there a way to check which items are in the listbox by index maybe? For example, listbox[0]?
If there is, maybe I can just update my text file with the current items on the listbox
How about if I want to add file paths to a file on a list box using a file dialog?
Go for it.
Did you ever make a video where you use listboxes with multiple selections? I followed this video and it worked great but once I added selectmode=MULTIPLE, the get ANCHOR doesn't seem to work anymore.
Yeah, I think I did...
@@Codemycom I've not been able to find it but I found some good info on stackoverflow to fix my issue. Thanks for these videos. They're great. Just about to watch the one about adding Scrollbars to List Boxes.
@@joshsfox6266 what did u do to fix it
hi john i need a GUI like eclipse tool left side panel .. that means if i click a folder it list all the directory in the path and each directory has a files it s also listed seperately
Fun...Good luck
@@Codemycom do u understand this
@@Codemycom i need ur help
Sir what is the best option(widget) to fetch all business transactions on that widget and print on a proper sequence withouy any irregularities and i want both the cursors i.e x and y? As i tried with l tried list box but annoying alot as there shoud be grids in it. How to make easy this situation if there is any grid widget who supports x and y cursors? Thanks alot
Sorry, I don't know what you mean.
@@Codemycom Sir i meant, how it could be possible to fetch all mysql data on a widget which could be easily managed grid wise e.g 00 , 01, 02, 03, and so on like we normally managed on frame or simple normal root windows. But the problem on the normal window or frame , is that we can't use vertical cursor or horizontal cursor in a case if we have hundreds of records. I tried with listbox and cursor but on listbox we can't put data grid wise and therefore we use lots of \t and still its creating problems. can you please tell me how to handle this situation or any other widget which could handles hundreds of records grid wise? thanks
Fantastic. Thanks a lot
You're welcome!
Hai sir i would like to ask how to separate the data which is selected from the database and insert into the listbox...
For me.. It look like
1 pen 20...
2 book 30...
I want to look like...
Pen,20 or any separation
Hello, have a problem, i need simulate when select one index from an listbox i want to see the same results in other listbox, how can make that?
What's the problem?
@@Codemycom I show a table with four ListBoxes, my problem is that when selecting any item from any listbox I want the others to look as if they are selected "illuminated"
Me 2 the END doesnt work I experienced it b4 in a past video and i strugled to find the error
while clicking the delete button, it doesn't delete the highlighted item, instead it deletes the item below. Pls help :)
from tkinter import*
root=Tk()
root.title("Listbox")
root.geometry("400x400")
#Listbox
list1=Listbox(root)
list1.pack(pady=15)
#add item to listbox
list1.insert(END,"pink")
list1.insert(END,"red")
list1.insert(3,"blue")
#add list of items
mylist=["purple","teal","white"]
for item in mylist:
list1.insert(END,item)
def delete():
list1.delete(ANCHOR)
mybutton=Button(root,text="delete",command=delete)
mybutton.pack(pady=10)
root.mainloop()
if i select any item from listbox then it can access all selected options data . for ex. i select any .csv file from csv file names listbox then it access all data of .csv file. It is possible or not ?
sure
Could anyone pls tell how to check the background colour of an item
in a listbox
How to enter data from barcode scanner into listbox?
I'm getting an error : TypeError: 'str' object cannot be interpreted as an integer. My list consists of strings. I tried END and "end" but still the same error. Any idea why ?
what are you trying to use as an integer?
@@Codemycom I sorted it out, just a simple typo :) thank you anyways John!
@@paweldylon5017 awesome
Is there a way to reverse the listbox so when an item gets added its added to the bottom of it? and then gets pushed upwards for every new item added. If that makes sense. :)
Like this:
First:
________
Item 1
________
Then:
________
Item 1
Item 2
Item 3
________
yes. my_listbox.insert(0, 'YOUR ITEM HERE')
0 is the first slot. All items will go in the first slot, pushing everything else down one.
nice video
Thanks!
END only works if you import *
Otherwise you will have to specify module name, like tkinter.END or tk.END
Yeah, that's why we import * at the top of the code...
I think my comments are being deleted as spam because I'm replying to someone with an URL as a name lol. May want to look into that. Anyway, it was a response to 5:36. It has nothing to do with operating system
@@scullyy No, you're mistaken. Nothing gets deleted. If it's spam, it gets flagged as spam and I have to approve it. That has not happened.
I can confirm comments I make with @Codemy**** in them gets flagged as spam
@@langeNOR Comments that get flagged as spam are sent to me for approval. They don't just disappear. And I'm not getting any from you.
i did the same at work but mine was a dried paint made a mark bleed bad
ouch
i got this error:AttributeError: 'NoneType' object has no attribute 'delete',pls help
Do you have a typo in your code?
@@Codemycom i checked and yeah, i had one. Thanks for helping me.
I cant find list box but from opening menu.
Huh?
thank you sir
You're very welcome
Brother I wish if you do a tutorial for building e-commerce website using Django and saleor.io or you suggest another method for building e-commerce website using Django. I personally do not like Wordpress
I may do an e-commerce site sometime..
Codemy.com thank you
as you said at the beginning, I smashed the like button with a hammer.. my screen got destroyed. Now can't see any thing
Ha, love it
Thanks
Sir can make video for CBSE class 12
In our syllabus is python
And more
Please Sir. 🙏🙏🙏
I have no idea what that is
Sir I am from India
i dont have listbox.insert
of course you do.
hmmmm
@@amirmohammadk745 You likely typed something wrong in your code
@@Codemycom maybe
@@amirmohammadk745 there's no maybe about it.
thx
welcome
Walter White teaching code ? unreal !
Haha
Why global?
why not
@@Codemycom You typed the keyword global for my_label and I'm trying to learn Python. I don't understand why you typed the word global. I think it would work just the same without the keyword global so I asked why you typed it. I haven't learnt a lot from your reply.