Using .config() to Update Widgets - Python Tkinter GUI Tutorial #63

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024
  • In this video I'll show you how to use .config() to update just about any widget with tKinter.
    So often, you need to update a widget on the fly in your program. Whether that be updating the text of a label, or a button, or something else; using the config function is the best way to do it.
    We can update just about any attribute of just about any widget with config, and I'll show you how in this video!

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

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

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

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

    I have a project due for school in a few days and these tutorials have really helped whenever I get stuck. Thanks!

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

      Happy to help!

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

    thank you so much, i was stuck in this problem in my project and i finally got a way to get out of it

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

      Glad to help!

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

    you are a good teacher, thank you for all your course.

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

      Thank you very much!

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

    Thank you man! I figured out how to finish the code for my first program with this video. It randomly selects a chord progression from a bank of thousands of midi progressions and updates the label with the file name. I'm planning on adding drag and drop to a DAW next and a few other features. Thanks for the tutorials!

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

    Thank you so much! whenever I saw the .config() command in tkinter I got just confused but now my doubt is absolutely clear. I wish I could give another like.

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

      Glad it makes sense!

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

    Thanks John for another video on this series, really appreciate it.

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

      My pleasure!

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

    Thank you for the Video! Just 1 question:
    How can I change the selection-options from a dropdown by klicking a button?
    A dropdown doesnt have a kex that I can change in the .config(), right?
    Thank you :)

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

    Sir, you literally saved me in my CE senior project. Thank youu

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

      Glad I could help!

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

      That is the power of the internet for ya! :D

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

    first of all thank you very much for your videos, because I was could learn how to open an image with Tkinter. However I tried to call the function again but the second photo appears not perfectly or as a new photo; that is why I wanted to ask if we could add a button somewhere and by clicking it we can call the function again ( as a redo function or restart or something like this)... Sorry for the long text and thank you again for your content.

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

    Your videos really taught me alot about Tkinter!.... Thumbs up!

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

      Glad to hear it!

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

    Ya just saved me about 2 hours of hassle my man. TY!

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

      Very Welcome!

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

    1 dislike, 1 guy with some serious issues. I feel sorry for you buddy. Thanks so much for these awesome videos.

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

      Right?! Thanks for watching!

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

    you deserved 1M+ subscribers and 10M+ views over each of your video

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

      Thanks! Tell your friends ;-)

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

    Eres dios, te amo pelón. Gracias por tanto y perdón por tan poco.

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

    Hi John. I've been watching your videos for the last few days. It's a wonderful walk through. I have a quick question. If we use class, we need not bother about whether a variable is global or not, right?

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

      It depends

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

    Hello Sir.
    Thank you so very much for explaining these concepts with amazing clarity.
    The after() method was just what I wanted for my project.
    You truly are a life saver.
    Thank you so much again, have a wonderful day!
    😀

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

      Glad you found it useful!

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

    Thank you sir!
    Please what's the difference between .config() and .configure()?

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

      No difference

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

    Im working on a project where i want the size of the text in a label to scale with the size of the label widget. I cant find anything online. If you see this could you point me in the direction of some documentation or example that could help?

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

      I believe I have videos on roughly that sort of thing (or close enough) on the tkinter playlist.

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

    can i set the text to a list with index so if i have questions = ["Quesdtion1,"2"]
    mylabel.config(text = questions[0]) ?

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

      yes, and why not just try it and see. You could have tried it yourself in less time than asking me lol

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

    Thank you very much for your tutorials please do not stop uploading your videos. It's the greatest source to learn Tkinter on the internet, Even Paid courses do not teach like this. Thank you so much.!

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

      Thanks! Will do...

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

    using .config(): How can I create a program that changes my Entry widget text color blue when a button is clicked - but if the user types in a new string, the text color goes back to default?

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

    I want to make a programm using tkinter that should update the text label on its own after a time. I used time.sleep() for that, but the problem is, the window loads until the timer run out, doasnt matter how long. What can i do?

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

    thank you for teaching this stuff!

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

    Thanks for this and more. Lets define a few widgets in a loop, say entry widgets with grey default text. Whenever the user changes the text in some of the entries all the widgets should be updated by .config method , e.g change text to black and font to bold or something. I've tried this, but only the very last widget is changed.

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

    Thanks John, love your videos, they are super quick and easy to get the answers I need. Thank you. How can we change an input field value with config?
    I am trying to build an image resizer by allowing the user to enter width and height after they load an image. Once image is loaded I want to set initial values in the Input boxes.
    Thank you so much in advance for your help.

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

    are you able to change what window the label appears on with config?
    for example:
    label = tk.Label(mainWindow, other configurations)
    # and then later you can say
    label.config(otherWindow) # or something like this as this doesn't work for me
    Thanks in advance :)

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

    Thank you for all your videos! Just have a quick question about config. I am trying to display a current file name with a label, then with a button, I get to change the file name in the label. I used .config to change the label text but the previous file name still lingers in the background (if the new file name is short enough). How can I fix this? Thanks again.

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

      You must have a typo because if you use .config on that same label, the old text cannot stick around. It gets replaced.

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

    Subs done. Thank you John for sharing your knowledge.

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

      Thanks for subscribing!

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

    First big fan! Love these videos and I'm grateful for them but why aren't there any videos dealing with __init__ and classes? Seeing as how when dealing with inputs you'll often have to use them in order to be able to pass the values/user data. As return doesn't work; not at all as I expected. I have a post on Stack Overflow about this issue.

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

      I've got a couple videos on the playlist that talk about classes

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

    Thats a beauty of tkinter

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

    Hello, i need help and i think this .config would help, i just dont know how. So, i have 2 buttons each with different commands:
    1. def loadPhoto() - this would display the input image
    2. def classify() - this should display/replace a NEW image (example after applying cv2 filter to the input image)
    However, is it possible to transfer the NEW image from def classify() to the def loadPhoto()? Please help 😭

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

    Hi john,
    I don't know if it only happens with me or everybody, every time I use the function .config() it gives me a error "AttributeError: 'NoneType' object has no attribute 'config ". Can you help me help fix pls.
    Thanks

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

      That's because you're defining and packing your widgets on the same line. like button = Button(Root, text="click me").pack() Don't ever ever ever do that or you'll get that error.

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

      @@Codemycom Oh I see. Bruh now I understand why that thing never worked in previous projects also
      Thank you so much

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

      @@hktechman8413 sure thing

  • @lynnrabah9051
    @lynnrabah9051 11 หลายเดือนก่อน

    do you necessarily need to define a function or can u just write label.config anywhere in ur code?

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

      you can, but if you do that it will automatically run immediately when you run your code. If you want to update only at certain times, you need functions

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

    How do I change a label based on the values of my other input widgets in real-time (without the need of a button)?

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

      Write a function to do it

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

    He sir
    I want to put the sleepiness detection video inside the tkinter.
    cv2.imshow('frame',frame)
    Can you give me some advice?

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

      I have no idea what that is

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

    Heya, so I updated a tkinter button's command but the old one just stayed there so i had 2 commands on 1 btuton. I was wondering if you or anyone in the comments would know how to delete a command in a button. -Thanks

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

      Just remove or comment out the command code.

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

    thank you sirr you are great you will have my blessings forever

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

      You're welcome!

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

    Literally 0 dislikes op sir!

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

    Hey nice tutorial but is there a way to "save" the label and button text in this case in a way that when you rerun the code it will already be the configured text. Hope you understood the question.

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

      Sure, you could save some settings to a file or database and retrieve them...in the normal way you save anything to a file or database with python...

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

      @@Codemycom Thanks, Cheers!

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

    This help me so much! thanks!

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

    Thx for upload..what a video👍👍👍👍👏 👏

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

      Glad you liked it!

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

    Love your videos. If I create several labels with a loop (for a formatted table), can I go back and access each label with .config ? Doesn't seem to let me 😞

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

      if you give them unique names you can

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

      Here is what I am trying to use, but can't make it work:
      from tkinter import *
      root = Tk()
      root.geometry('1000x500')
      cell= 0
      for r in range(15):
      for c in range(5):
      label+str(cell) = Label(root, text="")
      label+str(cell).grid(row=r, column=c, padx=25)
      label+str(cell).config(text=cell)
      cell = cell+1
      Just caught this morning that I needed to convert my cell integer into a string, but still doesn't seem to help.
      I'm a retired 69 year old who is bored and just trying to stay busy, but any help you can provide would be greatly appreciated.
      I'm reading in a spreadsheet with 12 worksheets where I store my monthly bank statements. Using Pandas, I'm reading the worksheets into a large dataframe, then trying to create a report from that dataframe that shows month, income for the month, expenses for the month, and difference between the two. I have most of this under control but have been using two lines plus a blank line to define each label, so its causing some very lengthy code. Decided to condense this into a loop to declutter.
      Thanks,
      Gary

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

      @@familyvideos4709
      cell= 0
      for r in range(15):
      for c in range(5):
      label = Label(root, text="")
      label.grid(row=r, column=c, padx=25)
      label.config(text=cell)
      cell = cell+1

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

      @@familyvideos4709 also, this might help: stackoverflow.com/questions/44588154/python-tkinter-how-to-config-a-button-that-was-generated-in-a-loop

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

    you are a real HERO man : )

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

    Thank you bro, I was struggling with this for a solid 30 minutes lmaooooooo

  • @rajeshsharma-pm6gz
    @rajeshsharma-pm6gz 2 ปีที่แล้ว

    I want to display value of a variable in an entry widget.. How can I do that, could you please help?

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

      I have many videos showing that on the playlist.

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

    I have doubt that config () work only when we write pack statement like this;
    button=Button(root,text="click me",bg="red")
    button.pack()
    And give an error if i write like this:
    button=Button(root,text="click me",bg="red").pack()
    Why??

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

      Yes, you never pack a thing on the same line that you define it.

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

    Can I change the position of a gridded button using the config method, since when I try to do so, it returns error: unknown option row

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

      use .grid_configure() instead of .config()

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

      @@Codemycom Ok, thankyou so much sir

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

    he saved my life tysm

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

    while running the program why does it say this AttributeError: 'NoneType' object has no attribute 'config' ?

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

      Because you likely packed and defined a thing on the same line. You can't do that.

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

    I have a doubt...can we change window state like root.config(root.state("zoomed"))😶...or is there any other way for doing so??

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

      Actually I've done it earlier (in my school project) but I forgot the code and now it is showing error 😅...

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

      No.

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

      @@aashishsaini5985no, you didn't lol

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

      You were right 🤣...I got my program back and the code was just...root.state("zoomed")😅there was no .config there

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

    Hi John Elder and all,
    How can we update e label in real time depeding on what we are tiping in an entry , for exemple in an register account part when we choose a password and the label says to us if the password is weak or strong or etc.

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

      use bindings

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

    what is the difference between label.config and label.set???

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

    Pls help it shows error NoneType has no attribute 'config'

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

      you can't pack and define a thing on the same line.

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

      omg, thank god i found the answer

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

    is it possible to make a leaderboard which changes as soon as we put info in it?

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

      Of course...anything is possible.

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

      @@Codemycom i mean how to do it can u make video on it

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

      @@fritzzcasts This video shows you how to do it. All you need to know is how to update labels...which is what this shows you.

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

    I want to make that if you click there comes a text and if you click the button again the comes a new text how do i make it,please?

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

      Add a counter and everytime you click the button, the counter changes...run logic on the counter to output whatever text you want.

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

    I keep getting this error that says: 'NoneType' object has no attribute 'configure'
    I didn't follow the tutorial line by line, I'm just following it along for my own testing program, and I keep getting this error but I don't understand why...

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

      You tried to pack and define a widget on the same line. You can't.

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

    bro thanks you really solve my problem

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

    what if you want to update text from a program. ?

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

    You helped me a lot.

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

      Happy To Help!

  • @75MAITREGiMS21
    @75MAITREGiMS21 4 ปีที่แล้ว

    thanks a lot you help me soo much :)

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

      Glad to help!

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

    It says local variable might be referenced before assignment when i use global
    global dayslbl
    dayslbl= Label(covWin,text="Day: "+str(days),font=("Arial",25,"bold"))
    def get_data():
    dayslbl.config(covWin, text="Day: " + str(d), font=("Arial", 25, "bold"))

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

    ur a savior man

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

      Ha, glad you liked it

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

    LIFE SAVER NO CAP

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

    Awesome tutorial but i need some serious help, everytime i try this i get an error like,
    AttributeError: 'NoneType' object has no attribute 'config'

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

      Did you define the thing and pack it on the same line? You can't do that

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

      @@Codemycom oh... damn 😂. thank you so much!!! really love your videos

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

    config does not show up as a method for label for me for some reason.

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

      show up? Just use it (and maybe stop using whatever crap IDE you're using).

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

    We can also treat a widget object as a dictionary and use the property names as keys to access and change the property values.
    For example :
    btn = Button(root, text="Hi")
    btn.pack()
    btn["text"] = "Hello"
    I don't think there's a difference between this approach and using the config method, but if anyone knows any difference, it would be interesting to hear that.

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

    how to change it back to original state sir

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

    is it possible to configure the position of a widget?

  • @666Husky
    @666Husky 2 ปีที่แล้ว

    As I just learned after a few hours of trying and crying... ".config" doesn't work, if you are in a while - loop.
    Apparently you need to use threading to get it done - I'll have to learn about that next.

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

      That's not necessarily true...unless your loop is doing something crazy.

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

    Hey!Great Video as always.Can you do video about building marketplace using python flask?It would be very helpful

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

      Great suggestion!

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

    Quite interesting indeed, ....but can one config Entry widget???

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

      of course, you can config any widget

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

    hello sir, how to creat number variable, change its value on button press and trigger different functions according to number var's value

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

      That's pretty much just basic python

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

      @@Codemycom is that included in your playlist

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

      @@bighouseentertainment9529 probably, it's just calling a function and in the function using an if statment to call other functions....there's nothing particularly hard about it...basic python.

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

    i'm having trouble using config with a canvas because I'm wanting to update a multi-line table

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

      I don't know what you mean by a multi-line table...but it shouldn't matter to config. You likely just have a typo in your code.

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

      @@Codemycom I have to use a canvas versus a label due to the content being more than one line (a table).

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

      @@Codemycom actually, i just realized i could easily do this with a label instead... lol thanks!

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

    intro 🔥🔥

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

    i am getting error "AttributeError: 'NoneType' object has no attribute 'config'"

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

      you defined and packed a widget on the same line, didn't you? You can't do that

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

      @@Codemycom wait let me change and try

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

      @@Codemycom I was getting the same error, I change the .place to the next line, and work! thanks!

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

    Can we do '.config' to change label images?

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

      give it a try to see

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

    him: programming python in sublime
    me: leaving the video

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

      your loss lol

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

      @@Codemycom no worries, thanks for the effort of making the video. Everyone is entitled to their own choice of ide, sublime just rubs me the wrong way

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

      @@keissetje Yeah a lot of wannabe coders feel that way lol

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

      @@Codemycom wow, feeling a little attacked or something? Why would you be so hostile. There are valid reasons for disliking it as an ide, for example the lack of code debugging and live evaluation. It's okay for html or JavaScript in my eyes but that's where it ends, in my personal opinion. Being so petty as to indirectly call me a wannabe developer because of disagreeing is quite unbecoming of a content creator

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

      @@keissetje lol you're the one who came to my channel and immediately insulted me with your first comment. yes you can have you're opinion, but you're wrong. This is my channel and the whole point of it is for me to teach what I know. This is one of those things that I know from over 35 years of coding. If you don't like it, just go away.

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

    Coooool!, Thank you!

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

      Very Welcome!

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

    after this tkinter series, can you make a series about the module pygame ?

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

      I'm not a game guy

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

    How can I use this for images?

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

      In the same exact way

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

    Thanks!!!

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

    Hola, tendrás un video sobre el método protocol. Buen video por cierto, fue de gran ayuda

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

      I don't know what you mean by protocol method.

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

    When i use . Config with my label it doesn't work

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

      there's no space after the period, and config needs to be lowercase... like this: .config()

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

      @@Codemycom AttributeError: 'NoneType' object has no attribute 'config' i serched in stackoverflow found nothing

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

      @@darkiiq8527 you defined your widget and packed (or gridded) it on the same line. You can't do that. Break it into two lines and then config will work.

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

      @@Codemycom wow it really worked thanks man 😭

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

    For me it says the name of my label isn't defined

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

      Then you need to define your label.

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

      @@Codemycom the thing is I want to put a button in a window that will print a label in another window, so how do I do that??

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

      @@sachasaucek7068 make your label name global to access it all over the place

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

    what about getting the configured value?

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

      You can always get a value by calling widget_name["text"]

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

      @@Codemycom I am getting errors when I use that. I change to grid layout and suddenly that statement is an issue. File "C:/Users/hoode/PycharmProjects/HelloWorld/app.py", line 96, in connectoport
      if connectPortButton['text'] == 'Disconnect':
      TypeError: 'NoneType' object is not subscriptable .What about cget?

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

      @@Codemycom Why is this not working for a button? In general, the error means that you attempted to index an object that doesn't have that functionality. ... 'NoneType' object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn't

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

      What a shitty GUI tool. I went back to pack layout and problem dissapears. How the hell does a layout manager cause a run time error!!!!!

  • @mayur-rathi
    @mayur-rathi 4 ปีที่แล้ว

    .config() is not working for buttons

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

      yes it does, you just did it wrong. You can't define and pack a button on the same line and then run a config for it.

    • @mayur-rathi
      @mayur-rathi 4 ปีที่แล้ว

      @@Codemycom thanks

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

      @@mayur-rathi sure thing

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

    Is there any possibility to donate this guy?

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

      Buy my membership from Codemy.com

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

    thanks :)

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

    great 👍

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

      Thank you! Cheers!

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

    thanks

  • @ab123-j7v
    @ab123-j7v 2 ปีที่แล้ว

    the real one

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

    😝configged!

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

    I tried everything to refresh a progress bar while in a "for i in range(0,max)'... neither my_bar.set () nor my_bar.config() works... The screen is only refreshed at the end of the loop...
    anything easy ?

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

    you are a real HERO man : )

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

    Thanks!