List Boxes - Python Tkinter GUI Tutorial #61

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

ความคิดเห็น • 139

  • @Codemycom
    @Codemycom  4 ปีที่แล้ว +3

    ▶️ 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

    • @shubhgaur2805
      @shubhgaur2805 3 ปีที่แล้ว

      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

  • @noice1031
    @noice1031 4 ปีที่แล้ว +20

    This deserves more views brilliant videos.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +4

      Thanks! Tell your friends ;-)

  • @AI_For_Scientists
    @AI_For_Scientists 2 ปีที่แล้ว

    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.🙏

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Glad you're enjoying them!

  • @EiswaffelGHG
    @EiswaffelGHG ปีที่แล้ว

    Just.. thank you for everything, John! I used to hate tkinter, but with your help.. i kind of like it!

  • @spike666spike666
    @spike666spike666 ปีที่แล้ว

    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!

  • @austinccolton
    @austinccolton 4 ปีที่แล้ว +3

    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!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Very glad to hear it!

  • @kulubrimbor
    @kulubrimbor 4 ปีที่แล้ว +1

    Thank you for this series in usual. You saved my project. Thx

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You're very welcome! Glad you enjoyed the videos!

  • @Lennardish
    @Lennardish 2 ปีที่แล้ว

    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!!!

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Ha, I just hit my head on something yesterday lol

  • @naveenvaddi9707
    @naveenvaddi9707 4 ปีที่แล้ว +4

    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 👍

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +2

      Yeah i need to do some videos on sizing...

  • @insertx2k_dev
    @insertx2k_dev 3 ปีที่แล้ว

    Thank you for such an awesome tutorial!, I hope you really get more than your current amount of subscribers as you deserve more!

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Thanks, tell your friends ;-)

  • @premprasad3511
    @premprasad3511 2 ปีที่แล้ว

    Very clear explanation. Thank you

  • @jefflee7704
    @jefflee7704 2 ปีที่แล้ว

    Thank you ever so much for your tutorials much appreciated

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Thanks for watching!

  • @tannerjohnston7762
    @tannerjohnston7762 4 ปีที่แล้ว +5

    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!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +2

      Interesting idea, can you display images in a listbox?

    • @anassportal
      @anassportal ปีที่แล้ว

      You read my thoughts

  • @whiteflag2366
    @whiteflag2366 3 ปีที่แล้ว

    Very cool. Thanks for sharing!

  • @2050bundele
    @2050bundele 4 ปีที่แล้ว

    This is very helpful , thankyou john

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Glad You're enjoying it!

  • @Potatostarch300
    @Potatostarch300 ปีที่แล้ว

    hello, thanks for the video. How would you create a numbered list where the number auto-populates as you type the next line?

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      I don't have any videos on that

  • @Abdulaziz-e-2030
    @Abdulaziz-e-2030 4 ปีที่แล้ว

    hello teacher I have a question in minute 10:35 __ why you should write global ((my_label))?

  • @salahroualmi9753
    @salahroualmi9753 2 ปีที่แล้ว

    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?

  • @JohnSmithZen
    @JohnSmithZen ปีที่แล้ว

    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)

  • @nobodyeverybody8437
    @nobodyeverybody8437 3 ปีที่แล้ว

    Would u plz show how to bind an event listener to the listbox to automatically detect the selected item?

  • @נועהבינסקי
    @נועהבינסקי 3 ปีที่แล้ว

    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???

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      pretty sure I have videos on that in the playlist...

    • @נועהבינסקי
      @נועהבינסקי 3 ปีที่แล้ว

      @@Codemycom thank you
      I will check 🙏

  • @charantechgeek
    @charantechgeek 4 ปีที่แล้ว +2

    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?

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      Sorry I can't know what's going on...you'll have to just dig thru and figure it out :-)

    • @charantechgeek
      @charantechgeek 4 ปีที่แล้ว

      @@Codemycom thanks for your response

  • @aimannabil6447
    @aimannabil6447 4 ปีที่แล้ว +1

    Hey John, amazing tuts. You earned a subscriber. Quick question, how do you update listbox in a thread?

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      In a thread?

    • @aimannabil6447
      @aimannabil6447 4 ปีที่แล้ว

      ​@@Codemycom Talking about concurrent programming but never mine I got it figure it out

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      @@aimannabil6447 Gotcha

  • @MD-cu8tt
    @MD-cu8tt 4 ปีที่แล้ว +1

    Thank you brother !

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You are very welcome

  • @justpourlapai3227
    @justpourlapai3227 2 ปีที่แล้ว

    Hello!! is it possible to display a second list boxes by selecting a value in a first list boxes?

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      of course. I have videos on dependent list boxes

  • @vincenzo3292
    @vincenzo3292 4 ปีที่แล้ว

    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.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      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

    • @vincenzo3292
      @vincenzo3292 4 ปีที่แล้ว

      @@Codemycom Thank you, this helps. Saw this video earlier, but I must have missed the connections. Great series btw. Thanks.

  • @premprasad3511
    @premprasad3511 2 ปีที่แล้ว

    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?

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      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

  • @RyanDanielG
    @RyanDanielG 3 ปีที่แล้ว

    feed the algorithm! great vid

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      thank you thank you!

  • @codefoxx
    @codefoxx 4 ปีที่แล้ว

    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!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      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.

    • @codefoxx
      @codefoxx 4 ปีที่แล้ว

      @@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]?

    • @codefoxx
      @codefoxx 4 ปีที่แล้ว

      If there is, maybe I can just update my text file with the current items on the listbox

  • @Kennerdoll
    @Kennerdoll 3 ปีที่แล้ว

    How about if I want to add file paths to a file on a list box using a file dialog?

  • @joshsfox6266
    @joshsfox6266 4 ปีที่แล้ว

    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
      @Codemycom  4 ปีที่แล้ว

      Yeah, I think I did...

    • @joshsfox6266
      @joshsfox6266 4 ปีที่แล้ว

      @@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.

    • @_-_-_-_-__--_-_-_
      @_-_-_-_-__--_-_-_ 4 ปีที่แล้ว

      @@joshsfox6266 what did u do to fix it

  • @manuneethicholan3536
    @manuneethicholan3536 4 ปีที่แล้ว

    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

  • @afridinaseer
    @afridinaseer 4 ปีที่แล้ว

    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
      @Codemycom  4 ปีที่แล้ว

      Sorry, I don't know what you mean.

    • @afridinaseer
      @afridinaseer 4 ปีที่แล้ว

      @@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

  • @profik5000
    @profik5000 4 ปีที่แล้ว

    Fantastic. Thanks a lot

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You're welcome!

  • @lvzodiac3161
    @lvzodiac3161 4 ปีที่แล้ว

    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

  • @danielramirez1022
    @danielramirez1022 4 ปีที่แล้ว

    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?

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      What's the problem?

    • @danielramirez1022
      @danielramirez1022 4 ปีที่แล้ว

      ​@@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"

  • @akramelomrani8728
    @akramelomrani8728 4 ปีที่แล้ว

    Me 2 the END doesnt work I experienced it b4 in a past video and i strugled to find the error

  • @annanyadesai1533
    @annanyadesai1533 3 ปีที่แล้ว

    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()

  • @ourstories007
    @ourstories007 3 ปีที่แล้ว

    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 ?

  • @rrrr-kg3wl
    @rrrr-kg3wl 2 ปีที่แล้ว

    Could anyone pls tell how to check the background colour of an item
    in a listbox

  • @marsoticchannel7207
    @marsoticchannel7207 4 ปีที่แล้ว

    How to enter data from barcode scanner into listbox?

  • @paweldylon5017
    @paweldylon5017 4 ปีที่แล้ว

    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 ?

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      what are you trying to use as an integer?

    • @paweldylon5017
      @paweldylon5017 4 ปีที่แล้ว

      @@Codemycom I sorted it out, just a simple typo :) thank you anyways John!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      @@paweldylon5017 awesome

  • @Svendzeen
    @Svendzeen 3 ปีที่แล้ว

    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
    ________

    • @paulblart4551
      @paulblart4551 3 ปีที่แล้ว +1

      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.

  • @valentinfaro4178
    @valentinfaro4178 3 ปีที่แล้ว

    nice video

  • @scullyy
    @scullyy ปีที่แล้ว

    END only works if you import *
    Otherwise you will have to specify module name, like tkinter.END or tk.END

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      Yeah, that's why we import * at the top of the code...

    • @scullyy
      @scullyy ปีที่แล้ว

      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

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      @@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.

    • @langeNOR
      @langeNOR ปีที่แล้ว +1

      I can confirm comments I make with @Codemy**** in them gets flagged as spam

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      @@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.

  • @newfoundland1956
    @newfoundland1956 ปีที่แล้ว

    i did the same at work but mine was a dried paint made a mark bleed bad

  • @generalpinochet9821
    @generalpinochet9821 4 ปีที่แล้ว

    i got this error:AttributeError: 'NoneType' object has no attribute 'delete',pls help

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Do you have a typo in your code?

    • @generalpinochet9821
      @generalpinochet9821 4 ปีที่แล้ว

      @@Codemycom i checked and yeah, i had one. Thanks for helping me.

  • @adamfatyga7977
    @adamfatyga7977 2 ปีที่แล้ว

    I cant find list box but from opening menu.

  • @szymindor3
    @szymindor3 4 ปีที่แล้ว

    thank you sir

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You're very welcome

  • @MD-cu8tt
    @MD-cu8tt 4 ปีที่แล้ว

    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
      @Codemycom  4 ปีที่แล้ว

      I may do an e-commerce site sometime..

    • @MD-cu8tt
      @MD-cu8tt 4 ปีที่แล้ว

      Codemy.com thank you

  • @supersonic6734
    @supersonic6734 3 ปีที่แล้ว

    as you said at the beginning, I smashed the like button with a hammer.. my screen got destroyed. Now can't see any thing

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      Ha, love it

  • @vanshatcode
    @vanshatcode 4 ปีที่แล้ว

    Thanks

  • @rajmaddheshiya3025
    @rajmaddheshiya3025 4 ปีที่แล้ว +1

    Sir can make video for CBSE class 12

  • @amirmohammadk745
    @amirmohammadk745 3 ปีที่แล้ว

    i dont have listbox.insert

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      of course you do.

    • @amirmohammadk745
      @amirmohammadk745 3 ปีที่แล้ว

      hmmmm

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      @@amirmohammadk745 You likely typed something wrong in your code

    • @amirmohammadk745
      @amirmohammadk745 3 ปีที่แล้ว

      @@Codemycom maybe

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      @@amirmohammadk745 there's no maybe about it.

  • @froehmaj
    @froehmaj 3 ปีที่แล้ว

    thx

  • @FatlessMidget
    @FatlessMidget 2 ปีที่แล้ว

    Walter White teaching code ? unreal !

  • @antonypace8907
    @antonypace8907 7 หลายเดือนก่อน

    Why global?

    • @Codemycom
      @Codemycom  7 หลายเดือนก่อน

      why not

    • @antonypace8907
      @antonypace8907 7 หลายเดือนก่อน

      @@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.