Creating Multiple Entry Boxes Automatically - Python Tkinter GUI Tutorial #65

Поделиться
HTML-код
  • Опубликовано: 19 янв 2025

Комментарии • 157

  • @noice1031
    @noice1031 4 года назад +22

    This video is literally what I've been looking for on the internet for ages! Thank you so much this is really gonna help with my project!

    • @Codemycom
      @Codemycom  4 года назад +2

      Glad it was helpful!

  • @princeshrestha659
    @princeshrestha659 4 года назад +2

    Spent numerous hours searching for this video. Gald I found one! Thank you codemy.

    • @Codemycom
      @Codemycom  4 года назад +1

      Glad I could help!

    • @gerardfinette98
      @gerardfinette98 4 года назад

      Hi I am very very new at it. I have a code in python for a round robin tournament. I need to connect it to thinker. can you help me? I will first need to write the names of plsyers which will then give me (lenplayers) . then I can run the python code.

  • @albertholman7435
    @albertholman7435 2 года назад +1

    Thanks for this video, it solved a problem for me (see fun text),
    Just for fun:
    if you change "my_entry = Entry(root)" to "my_entry = Entry(root, text='Test')"
    then typing in one box will fill all the other boxes at the same time :)

  • @edyvideosnice
    @edyvideosnice 3 года назад

    Dude im from México and i always see your videos when i have a question with tkinter, and always you save my life with my homeworks, thanks and good luck.

  • @Codemycom
    @Codemycom  4 года назад

    ▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My RUclips 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

  • @brianmcurtis
    @brianmcurtis 4 месяца назад

    Finally! I'm trying to display 16 channels of soil humidity, changing the color of the box to indicate the ones that need attention, and code was turning into an unreadable novel. A couple well documented loops later and my code is clean, readable, and functional. Thanks!

    • @Codemycom
      @Codemycom  3 месяца назад

      Glad to hear it!

  • @BN-SonOfTheSoil
    @BN-SonOfTheSoil 2 года назад +1

    Dear John, How do you pass in the textvariables in these multiple entry widgets

  • @kunxu5612
    @kunxu5612 3 года назад

    this is exactly what I demand. honor the vloger.

  • @ARUNKUMAR-op6cn
    @ARUNKUMAR-op6cn 4 года назад

    Sir, Only because of you I could able to finish all my projects. Thanks alot

    • @Codemycom
      @Codemycom  4 года назад

      Awesome! Thanks for saying that, I'm glad I could help!

  • @ogglieostrich2574
    @ogglieostrich2574 4 года назад

    thank you sooo much man. I've been given an assignment to complete in one week where i have to make a working chessboard using tkinter and an OOP approach and i have no previous experience with either of the two . I was about to be stuck on this for like 5 hours if i didn't find this video.

  • @osce8083
    @osce8083 Год назад

    Hello, do i need the same way to get the values of checkboxes? Just append the values into a values list? Or do i need to append the checkboxes to a list?

  • @jayhampa3403
    @jayhampa3403 2 года назад

    Thanks so much for saving me so much time. I had been searching for this information for so long.

  • @gerardfinette98
    @gerardfinette98 4 года назад

    This video is very very good. ii eally like the step by step line explanation.

  • @alpapatel5182
    @alpapatel5182 4 года назад +1

    It was soooooooooooo much helpful for me
    And I have been looking it from weeks

    • @Codemycom
      @Codemycom  4 года назад

      Glad it was helpful!

  • @martin-xq7te
    @martin-xq7te 2 года назад

    Great work John

  • @missionreadysoftware5998
    @missionreadysoftware5998 2 года назад

    Thank you. I am trying to update the my_entry itself as opposed to retrieving the text in the entry. How can I do this in your example?

    • @Codemycom
      @Codemycom  2 года назад

      I have lots of videos teaching entry stuff on the channel

  • @jeshhhhuih
    @jeshhhhuih 2 года назад

    hello sir I am your big fun I learned coding from you your channel helped me a lot
    please make a playlist on OOP with tkinter I need this a lot I can't find good vidoes

  • @jmegens7487
    @jmegens7487 4 года назад +1

    Thank you very much for this video. If I my_entry.grid_remove() at the end and I want to recall the my_entry again, how can I do that? (my_entry.grid() is not working) Thank you so far for this video i liked it very much!

  • @arulrayappan.i7030
    @arulrayappan.i7030 4 года назад

    Very good explanation and demonstration

  • @PeeOrbital
    @PeeOrbital 4 года назад

    Exactly what i was looking for, thank you John!

  • @michelnaouss748
    @michelnaouss748 4 года назад +1

    What are you clicking to jump from one entry box to the other?

    • @danzafut
      @danzafut 3 года назад +1

      I'm guessing the Tab button!

  • @nivp99
    @nivp99 Год назад

    Sort of what I wanted but not quite. I want 4 entry boxes on a row with a checkbutton on the row that enables/disables the entry boxes, which I've successfully done for a single row, but failed to create a loop method to replicate the dozen or so rows of the same that I want. My main stumbling block is the variable that enables only its associated row. A final 'ADD' button will get all the data from all ENABLED entry boxes, ignoring disabled ones, into a global list, along with a unique header ID (Other frames will have other 'ADD' buttons to add to the global list, which will later be processed to make a final output file.

  • @brianhays3704
    @brianhays3704 4 года назад +1

    What a helpful video! Thank you! I have one question about the loops though. I understand the x and y loops create the rows and columns of boxes. But I'm confused about append... why does the "append" work all the time? In my mind it would ONLY append when creating the boxes. This is bothering me a bit. Does the append function basically tell the computer to "append all the time no matter what"? Thanks!

    • @danzafut
      @danzafut 3 года назад

      Hi Brian!
      So here's the best way that I can explain it. Originally, you have an empty list called my_entries. This list will eventually contain a list of Entry widgets after the for loops run. During the for loop, an Entry widget is created, and then added to the my_entries list via the .append() method. Once the for loop has completed and each widget has been displayed on the screen via the .grid() method, you can enter values into the widgets.
      When you click my_button, the something() function runs. Using the .get() method, you are able to display each value that was in the Entry widgets in my_label (a really big label).
      You are correct in thinking that the .append() method only appends the list when creating the widgets. The list is just a list of Entry widgets and an easy way to reference each using their index.
      Hopefully this helps!

  • @Boekoe12
    @Boekoe12 2 года назад

    is there any method to destroy those entry boxes created from a For loop? I currently use .destroy() but that only destroys the last one.

  • @aj5686
    @aj5686 4 года назад

    I always had a doubt about how to create multiple buttons or entry boxes etc. Now it is cleared, Thak you sir. Is there a way to disable the string entry into the entrybox such as typing alphabets or words from the keyboard and to allow only number entry? If we can do that please tell me sir. Thank you.

  • @fighting6320
    @fighting6320 Год назад

    Amazing video! Is there any way to select and update the treeview dynamically with a for loop?

    • @Codemycom
      @Codemycom  Год назад +1

      Sure, I'm sure I have videos on that somewhere on the playlist

    • @fighting6320
      @fighting6320 Год назад

      @@Codemycom thanks for your fast reply. :) I watched your video #121 of this playlist but there for selecting and updating the treeview data you just called the entry fields one by one. How could this be done by loop? :) Would be so nice to receive an answer. Great job!

    • @Codemycom
      @Codemycom  Год назад +1

      @@fighting6320 I mean, just use a loop however you want...if you know how to update treeview for one thing, you know how to update it using a loop...just use the loop in the normal way you use any loop...

    • @fighting6320
      @fighting6320 Год назад

      @@Codemycom yeah you are right. Maybe I have to understand how loops are really working in the first place... Thanks

    • @Codemycom
      @Codemycom  Год назад +1

      @@fighting6320 sounds like it.. :-)

  • @devinoshchannel8886
    @devinoshchannel8886 2 года назад

    hi, i know maybe it's a bit late for this comment, anyway, i was doing a job with python and i recreated more or less the same situation as you, with only the labels that through buttons change their text, but all the buttons affect only one label and I wanted to ask you how can I fix?

  • @peterm5479
    @peterm5479 4 года назад +1

    Excellent tutorial - any ideas of how this could be extended to include row and column totals?

    • @Codemycom
      @Codemycom  4 года назад

      Sure...you have all you need to do that already. Just add them up.

    • @peterm5479
      @peterm5479 4 года назад

      @@Codemycom I thought that but I cant get the text entry converted to a string. I'm doing the obvious things (int()) but cant get it to convert so that I can add them.

    • @peterm5479
      @peterm5479 4 года назад

      John, thanks for bouncing it back to me to sort myself - I got it sorted and enjoyed the process. Your tutorials have been great!

  • @arpithasura9946
    @arpithasura9946 3 года назад

    Hello, what if we want to trace the value modified outside for loop any time while running the program without button widget??

  • @lasnroo
    @lasnroo 3 года назад

    Thanks man ... but, how can I move de curso up, down, left, right on this entries?

  • @ebiscaia
    @ebiscaia 2 года назад

    Hi,
    Nice video as always. My case is a bit different. I would like to create a lap tracker calculator. One label: Enter lap #{lap_number}. Four buttons: Next lap, Calculate, Reset, Quit.
    Every time I click Next Lap button, the Label updates with a new lap number, the entry field cleans and the lap list appends the value inputted (the order here may be different. Calculate, would give me in a text box the best, worst and average lap time. Reset button would clean the textbox and the lap time list. In this case I am having a bit of trouble with how deal with the first part (the Next button). Any help would be appretiated.
    Cheers

  • @antinom
    @antinom 4 года назад

    Хорошее и понятное видео. Спасибо.

  • @RyanDanielG
    @RyanDanielG 3 года назад

    feed the algorithm! great vid

  • @SahithiGottumukula895
    @SahithiGottumukula895 2 года назад

    Can you please make a video with multiple functions defined and then calling the local variables of function at the end or in other function please?

  • @judeleon8485
    @judeleon8485 4 года назад +1

    Thanks a million for this video. It's so helpful. Can you please do a video on text widget?

  • @tazulislam2698
    @tazulislam2698 2 года назад

    how to remove a single row from those entries? Please!

  • @mehnajtharranum4194
    @mehnajtharranum4194 3 года назад

    How can we make it into a dialog box and where are its outputs stored?

  • @stevemarten3383
    @stevemarten3383 3 года назад

    Please How can I move from an entry box to another by pressing enter ?

  • @Romalian
    @Romalian 4 года назад

    Couple questions:
    1. Whenever I submit my text, all my entry boxes get all scattered. How do I prevent this? And no Im not copying yours, its my own work.
    2. How would I make it so the text that appears is going into a different word box that you can edit, copy and paste it?

    • @Codemycom
      @Codemycom  4 года назад

      Without seeing your code, I couldn't guess why it's doing that.

    • @Romalian
      @Romalian 4 года назад

      @@Codemycom I dont suppose there's a way you could see my code...
      But is there an answer to my second question cause that ones had me stumped for days now? Is it impossible?

  • @andreivlaicu51
    @andreivlaicu51 4 года назад

    Great video! I`m wandering if you have a solution for the problem: If I`m copying the data from a excel file (as example 2x rows and 2x columns, or more) and paste them in a tkinter table interface, everything will be pasted in a single entry. The excel cells will not be spread in tkinter entries (ex: excel A1, A2, B1, B2 are going in the same entry and the point is to make them go in different entries: A1 cell data to be paste in mouse selected row * col; A2 cell data to be paste in mouse selected row + 1 * col + 1; B1 on row + 2 * col + 1 and B2 on row + 2 * col + 2 etc.).

    • @monacogaa6097
      @monacogaa6097 4 года назад

      I came across the following 3rd party tk widget a few months ago, it may be what you're looking for:
      github.com/ragardner/tksheet

  • @Hard_Online
    @Hard_Online 3 года назад

    And how do u do it with pack

  • @CyberKrish271
    @CyberKrish271 3 года назад

    Greatest video.....

  • @srky19
    @srky19 Год назад

    the loop only ever places one widget in parent element for me, then stops and exits like everything is fine. I'm using customtkinter and trying to add multiple buttons in scrollableFrame

    • @Codemycom
      @Codemycom  Год назад

      Check your code, I suspect there's an error or typo

  • @nguyenvantrieu9963
    @nguyenvantrieu9963 4 года назад

    Thanks a billion for this video. It's so helpful.!!!!!!!!!!!!!!!!!!!!!!!!

  • @GIS_World
    @GIS_World 4 года назад

    Which is the best reference book to learn TKinter??

    • @Codemycom
      @Codemycom  4 года назад +1

      I don't know of any books...I plan to write one myself

  • @CHAITANYAKARTHICK
    @CHAITANYAKARTHICK 4 года назад

    which is best tk inter or pyqt for gui

    • @Codemycom
      @Codemycom  4 года назад

      It's a personal preference

  • @jinhaesik
    @jinhaesik 3 года назад

    case request : multiple row dependent combobox --> please~~

  • @danzafut
    @danzafut 3 года назад

    Thanks for creating this!

    • @Codemycom
      @Codemycom  3 года назад +1

      Thanks for watching it!

  • @azorynicodemas609
    @azorynicodemas609 4 года назад +1

    Hello, I'm new to programming, how can you advise me🙏🏿. From Tanzania 🇹🇿

  • @aneeshmalapaka8363
    @aneeshmalapaka8363 4 года назад

    Hello sir, I wrote a piece of code where it just, for now, displays a label and an entry box beside it, like in database thing but now when I do the for loop thing, it is just getting overlapped..pls see the code
    for x in range(1,3):
    for y in range(5):
    if y==0 and x==2:
    entry_box=Entry(root,font=("Helvetica",15))
    entry_box.grid(row=y,column=x,padx=5,pady=3)
    break
    else:
    entry_box=Entry(root,font=("Helvetica",15))
    entry_box.grid(row=y,padx=5,pady=3)
    label_name=Label(root,text="Name:",font=("Helvetica",15))
    label_name.grid(row=0,column=0)
    P.S I didn't put all labels coz, don't wanna make it big...just for u to see and get the idea I kept that part, sir.

    • @copham326
      @copham326 4 года назад

      @Aneesh Malapaka, Not sure what you want to do but you forgot to add column in the entry_box.grid of the else statement. It should be 'entry_box.grid(row=y, column=x, padx=5, pady=3).

    • @aneeshmalapaka8363
      @aneeshmalapaka8363 4 года назад +1

      @@copham326 yeah i got it, i missed the column box..i figured it after posting comment..and forgot to delete it😂..thanks anyway

  • @kunle009
    @kunle009 2 года назад

    When I ask the user to input the number of entry boxes he wants in my little program. The number of entry boxes only increases but doesn't reduce. For example, when the user inputs 5, 5 entry boxes are created but when the user then inputs 3, 5 entry boxes still appear on the window instead of 3. But when the user inputs 7, then 7 entry boxes would now be created. I really need help on this.

    • @Codemycom
      @Codemycom  2 года назад +1

      destroy the previous boxes before creating the new ones

  • @srikanthsailada6535
    @srikanthsailada6535 4 года назад

    I have a project in which I create multiple entries and delete them. So how can we delete all those entries at once..?

    • @Codemycom
      @Codemycom  4 года назад

      write a function to delete them all

  • @vigneshvicky6720
    @vigneshvicky6720 4 года назад

    Can u make a video about how to add scrollbar to frames..plz its very usefull in many projects...for many one..and no one did video about it
    ...U plz do it soon plzz..

  • @Rushikesh.Shende
    @Rushikesh.Shende 4 года назад

    I am trying to create multiple entries but in a form of an array. So I created a list containing 81 entries in the form of 9*9 array. But I am not able to use the .get() function when referencing to an entry. Where could I be going wrong?

    • @danzafut
      @danzafut 3 года назад

      Hi Rushikesh, what is the error you are getting?

  • @Shaffi003
    @Shaffi003 4 года назад

    Hi..I am creating an app to process the importing CSV into device configurations. I want to host a template format CSV to bind with a button to download in python GUI Tkinter. How can we made it.. looking for some sample code. Kindly help

    • @Codemycom
      @Codemycom  4 года назад

      Sorry don't know what you mean.

  • @navyaelectricals9180
    @navyaelectricals9180 4 года назад

    Dear sir, how do we write our variable to specific entry box in multi entry box created by you, for example how to write or insert value to row=1 and col=1 please help me I am searching for that

    • @Codemycom
      @Codemycom  4 года назад

      I don't know that you can do that. Entry boxes don''t seem to be multi-line

  • @mdzohaib7368
    @mdzohaib7368 4 года назад

    Sir, Can u tell me if i make a entry box by some name lets say ' e ' then if i write print(e) then its returning me .!entry
    And when i create a button to print print(e.get()) its returnin me nothing even i write something on entry box.
    In this video you used my_entries as a list. But why? What its returning in the list?
    Actually i am confused what entrybox is returning. Can you help me?

    • @Codemycom
      @Codemycom  4 года назад

      e.get() should return something if there's something there. You must have had a typo or error in your code. With print(), it only prints with tkinter after you close your program.

    • @mdzohaib7368
      @mdzohaib7368 4 года назад

      @@Codemycom actually i was using 5x5 entry box by using 2 for loop and then by typing print(e.get()) its jst returning me 25 new line in output.

  • @premkishore3925
    @premkishore3925 4 года назад

    Can you make a video in which we can input No. of Entry Boxes and then that no. of Entry Boxes created?

  • @rverm1000
    @rverm1000 3 года назад

    i could use this at work or on an arduino app

  • @oscarfernandez7292
    @oscarfernandez7292 4 года назад

    How could all the entrys be filled with a for?

    • @oscarfernandez7292
      @oscarfernandez7292 4 года назад

      is
      possible?

    • @Codemycom
      @Codemycom  4 года назад

      So, not sure what you're asking

    • @oscarfernandez7292
      @oscarfernandez7292 4 года назад

      ​@@Codemycom thanks for your answer.
      I create several entrys as you explain in this video. I want to show in these 20 entries the values ​​of a list, or treeview, to be able to edit them, and then save them in my list or treeview. I am trying to combine gui # 117 with gui # 65. Is it posible? or do I need to do the entries one by one?

  • @sandeepkaur.25573
    @sandeepkaur.25573 2 года назад

    When i write entry word it shows error please help me

    • @Codemycom
      @Codemycom  2 года назад

      What did you do differently from the video?

  • @mujassimjamal24
    @mujassimjamal24 4 года назад

    Sir, How to change buttons shape ?

    • @Codemycom
      @Codemycom  4 года назад

      Not really easily done

  • @daniyaldolare3782
    @daniyaldolare3782 4 года назад

    So here I understand that lists individual elements are actually stored in individual object but that objects are referenced by list name and index....am I right? I used a lot of brain power to understand or create this logic!

    • @daniyaldolare3782
      @daniyaldolare3782 4 года назад

      It's what list are....I learn linked list in c and all elements are stored individually and are connected to each other.....

    • @daniyaldolare3782
      @daniyaldolare3782 4 года назад

      Ohh I am actually using my brain too much😩

    • @Codemycom
      @Codemycom  4 года назад

      Sorry, no clue what you're talking about...a list is a list...the individual items of the list can be referenced by using their item number...

    • @daniyaldolare3782
      @daniyaldolare3782 4 года назад

      Ya I understand but this my theory 😁

  • @محمدرياضخشان
    @محمدرياضخشان Год назад

    Thanks a lot you help me really 🙏

  • @abdullhaseeb4157
    @abdullhaseeb4157 3 года назад

    Can somebody tell me how to add a list of data to the treeview table once I press a button, Let's say I have a function that generates random phone numbers and once the phone numbers are generated I want them to be shown in a treeview table please guide me, its urgent

    • @Codemycom
      @Codemycom  3 года назад

      I have videos on that in the playlist...more than a few

    • @abdullhaseeb4157
      @abdullhaseeb4157 3 года назад

      @@Codemycom please please can you guide me to it with a link please.

    • @Codemycom
      @Codemycom  3 года назад

      @@abdullhaseeb4157 Check the tkinter playlist on my channel and look for the videos about treeview, it's the last 10-15 on the list.

  • @nguyenvantrieu9963
    @nguyenvantrieu9963 4 года назад

    You are great!

  • @mediislive
    @mediislive 4 года назад +1

    CORDMY.COM IS NOT OPENING

    • @Codemycom
      @Codemycom  4 года назад +1

      that's not my website, you want codemy.com

    • @mediislive
      @mediislive 4 года назад +1

      @@Codemycom OH SORRY! I TYPED WRONG

    • @mediislive
      @mediislive 4 года назад +1

      @@Codemycom YES! IT'S WORKING

    • @Codemycom
      @Codemycom  4 года назад +1

      @@mediislive :-)

    • @mediislive
      @mediislive 4 года назад +1

      @@Codemycom THANK YOU! BUT I HAVE 1 PROBLEM THAT WHEN I USE "RADIO BUTTON" IT IS ALREADY FILL NOT LIKE YOU THAT WHEN WE CLICK IT GET FILL. GET TELL ME WHAT I DO?

  • @andrerossi6026
    @andrerossi6026 Год назад

    THANK YOU!!

  • @fredyvillatoro2056
    @fredyvillatoro2056 3 года назад

    you are a god

  • @faithprogaming7867
    @faithprogaming7867 3 года назад

    Got what I have been looking for ages, Thanks Codemy.com
    Commenting for better reach.
    tkinter entry box get text,tkinter entry box example,tkinter entry box default value,python tkinter entry box,tkinter entry widget example,python tkinter excel,tkinter entry widget loop,tkinter entry loops,tkinter for loop,gui python,python tkinter,python gui,tkinter python,python grid system,grid system tkinter,build graphical user interfaces with python,how to build graphical user interfaces with python,tkinter entry widget,python tkinter gui

  • @dcdondon
    @dcdondon 3 года назад

    Thanks!!!

  • @keepflying7137
    @keepflying7137 4 года назад

    it's great

  • @cristif92
    @cristif92 2 года назад

    I think I am an idiot :/
    I tried changing dinamically the labels with: exec("{} = {}".format("Label" + str(i), Label()), instead put them on a global list :D
    Thanks again ! :)

  • @codeir9578
    @codeir9578 4 года назад

    👌👌👌👌👌

  • @davidarayanieto
    @davidarayanieto 4 года назад

    Genial

  • @gbindia3192
    @gbindia3192 6 месяцев назад

    Entry.insert(0, "Thanks Man")