Creating Buttons With TKinter - Python Tkinter GUI Tutorial #3

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024
  • How to create buttons with TKinter and Python. In this video I'll show you how to create buttons with tKinter. Its pretty easy!
    In this series I'll show you how to create graphical user interfaces for Python with Tkinter. TKinter comes with Python already, so there's nothing to install!
    ✅ Watch The Other Videos In This Python Playlist:
    bit.ly/2UFLKgj
    ▶️ See More At:
    Codemy.com
    ✅ Join My Facebook Group:
    bit.ly/2GFmOBz
    ✅ Subscribe To My RUclips Channel:
    bit.ly/2IGzvOR
    ▶️ Learn to Code at Codemy.com
    Take $22 off with coupon code: youtube

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

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

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

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

      @poodles Game sure thing

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

      what if the button's command is a function that requires me to send a value? I can't use the bracket cus the function will just start. How should I do it? Or if u made a video about it can u link it to me pls

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

      @@iancheng6861 use lambdas...yeah I've done videos on it. command=lambda: function_name(pass stuff)

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

      @@Codemycom thx thx

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

      @@iancheng6861 sure thing

  • @hudaadnan1382
    @hudaadnan1382 4 года назад +75

    Such a friendly ,smooth and clear explanation , I'm really having fun with it. Thanks a lot.

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

      Thank you! I appreciate that!

  • @Alicia0Cramel
    @Alicia0Cramel 4 года назад +39

    Thank you. I really like your teaching style. You come across as very friendly and patient. It makes me want to learn more from you.

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

      Glad you're enjoying them!

  • @blazingterminator6252
    @blazingterminator6252 4 года назад +59

    You're kind of like the best thing that ever happened to youtube :)

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

      Wow, thanks!

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

      Unleash your Tech bruh, no need to use foul language

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

      @@atakheli3608 its not me my bro he has no idea how to code in python then he learns from RUclips but makes slightest of mistakes and does this shit from my account

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

      Unleash your Tech oh ok, hopefully he he gets better at code

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

      @@atakheli3608 he just made tic tac toe its on the App Store I helped him a lot but yah

  • @mrbooscloos2431
    @mrbooscloos2431 3 года назад +3

    I just started with Tkinter today and i already know how to make a button. Good video and i think its the best explanation i've seen so far!

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

      Good job, keep it up! :-)

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

    I learned how to use Python GUI in just a few hours, just amazing.

  • @oreofreakshake
    @oreofreakshake 4 года назад +11

    I really really appreciate your content, BIG TIME❤

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

      Glad you enjoy it!

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

    really liked the way you teaching this, when i am not broke and have extra time i will surely check out your courses.

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

    Awesome lectures, even a beautiful teacher taught amazing lessons.

  • @deasan7429
    @deasan7429 3 года назад +2

    Hi, thank you so much for your videos, they are really useful!
    I love the way you explain everything.
    I found it easier to write everything in Visual Studio Code and then just "run" it from there instead of using the Windows Terminal and always typing the command.
    I like to use as many shortcuts as possible, I do like Sublime text too but since VS I find everything easier on it.

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

      Glad you enjoy the videos :-)

  • @ashrsfsiliman452
    @ashrsfsiliman452 3 года назад +2

    Great job deserving of thanks
    عمل رائع يستحق الشكر

  • @catsubiston
    @catsubiston 9 месяцев назад

    thank you for this video! im doing A personal project and I rlly want to immerse myself with GUI specifically tkinter and i already have good feeling about it, thank you

    • @Codemycom
      @Codemycom  9 месяцев назад +1

      Glad you're enjoying it!

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

    Your videos are great. I love your way of teaching. Thank you so much John for providing this for free!

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

      Glad you enjoy them!

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

    thank you so much for replying to every comment it is so cool!

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

    I am exactly the person who you made this video for and who would change the color of buttons and make them bigger lol I am legally blind and starting to work on creating a customTkinter GUI for the visually impaired and a large orange send button would be very helpful :-) thanks for the info I'm going to watch all 200 and whatever videos lol I probably won't come up with a working app but you'll get watch time haha

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

    Great lessons my friend, you're a good person!!

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

    It very difficult in my country to get teachers like you....... I'm from India Love you sir
    thanks for this

  • @MaiBuiXuan-hm6ud
    @MaiBuiXuan-hm6ud Год назад

    Really useful for my next seminar in class. Thank you

  • @IGCSENERD-up6yv
    @IGCSENERD-up6yv 3 месяца назад

    Now I am going to beat my friend's challenge! All thanks to god, then to you!

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

    What else can i say... thank you soooooo much. you the man.

  • @mahmad2504
    @mahmad2504 Месяц назад

    Button padx, pady are not to change size of button. They are to add extra padding around button text

    • @Codemycom
      @Codemycom  Месяц назад

      which changes the size of the button. why argue semantics that are meaningless?

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

    Cheers! For my 1st Button with you!

  • @zsu6333
    @zsu6333 2 месяца назад

    You actually blew my mind 😂

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

      glad to hear it! lol

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

    Very interesting. I am running this on an Orange Pi-5 Debian-Bullseye 64-bit OS. Now I need to figure out how to make the OPi5 OPi.GPIO Python3 PWM pins run the servo Pan/Tilt motors? They are a little different than the Raspberry Pi4 setup. It would be cool to control the servos with some TKinter buttons. 😎 Thank you.

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

    Sir I'm Your New Student Love From Pakistan

  • @user-botlol
    @user-botlol 4 месяца назад +1

    thank you so much
    !!!!!

  • @mbn-code
    @mbn-code 4 года назад

    thanks alot this was easy and fast to learn and i feel like i have acheved somethign, thanks!

  • @R8M3N25
    @R8M3N25 3 года назад +2

    I want to add some kind of light besides a button(s) and each time the button(s) was(were) clicked the light jumps from red to green and in case an error occurs or the function couldnt be executed the light stays red. Any idea how to tackle that? Thanks a lot for the help in advance!

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

    I understood very clearly

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

    would love to see a video on Websockets in Python via flask/dejango

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

      I'm planning on doing a lot more flask videos soon

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

    Thanks to this I have a wall of buttons

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

    Your videso are great!! Continiues with thes god work!

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

    This guy is seriously awesome haha

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

    Lesson check. Thanks.

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

    Great tutorial, the only thing is that the fg="blue" works fine, but bg="red" does not change the button colour. Both parameters are coma separated. I'm on Mac.

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

      You must have a typo...did you forget to wrap red in quotation marks or something? You can also use hex color codes.

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

    You're really a magician.

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

    loving this!

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

    I appreciate your teaching

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

      Glad you're enjoying it!

  • @NuwanSampath-fi5zr
    @NuwanSampath-fi5zr 8 месяцев назад

    thank you for your help.❤❤😊

  • @anumduryab8748
    @anumduryab8748 5 лет назад +2

    how to deal with the problem of button resizing with window resizing using grid?

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

      Are you asking how to make the window bigger while the button maintains its current size?

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

    Hi, the videos are all good, thank you very much.

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

    Best way to teach. Go on.

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

      glad you enjoyed it, there's almost 200 more videos on this playlist

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

    I imagine the function call parentheses are left off because the statement command already denotes a function. Weird little quirk.

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

    Why does 'my_click' work differently than 'my_click()'?

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

    thank you for these videos. very informative

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

    Is there a video in your playlist, that goes more in depth so that i can place things in my program more accurately, maybe even click and drag things into a place... maybe using coordinates or something, then you type them in? thx

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

    this is a simple way to learn python .

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

    When using bg to change the color it isn't working for me at all; fg works completely fine but bg doesn't change anything. Do you know why that may be happening? Appreciate the videos :)

  • @babay-mp4bq
    @babay-mp4bq 2 года назад

    this guy is rock !

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

    very clear explanation awesome channel, I'm gonna SUBSCRIBE! and like

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

    sir thanku that ( ) guide help me alooooot thankuuu

  • @rodrigopharazz
    @rodrigopharazz 8 месяцев назад

    Thank you🙏

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

    Is there a way to increase the feedback when you click a button? When I click a button you can barely tell that you clicked it. Thank you for all your videos :-)

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

    Can we change the shape of the button too?
    Plz help....

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

      Not really...you can use an image and then bind that to a click, but it's a hacky sort of thing...

  • @tor6953
    @tor6953 9 месяцев назад

    Thank you

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

    Hey i want to pass an argument while we click a button, how to deal with that case, please help anyone

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

      Use a lambda, I have many videos on that in the playlist

  • @Christine-ne3dw
    @Christine-ne3dw 3 года назад

    Thanks for the vid

  • @user-ik2pj7ch1n
    @user-ik2pj7ch1n 2 года назад

    شكرا كثيرا perfect

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

    Is the a way to put a Checkmark (ALT 0252) on the button?

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

    Thank you!

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

    Even when I put in the root.mainloop(), there's no feedback when I press the button. Why? (I'm on Mac btw)

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

      even? You always have to put the mainloop no matter what...that has nothing to do with the button. Did you give your button a command? There's likely a typo in your code

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

      @@Codemycom Here's my code:
      from tkinter import *
      root = Tk()
      def click():
      label = Label(text = "You pressed me!")
      label.pack()
      button = Button(root, text = "Press me!", command = click)
      button.pack()
      root.mainloop()

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

      ​@@_fluffyy1028 that code works fine. Are you using other tools than I use?

    • @Kunal-jd6hc
      @Kunal-jd6hc 3 года назад

      @@_fluffyy1028write root in Label

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

    Cảm ơn bạn!

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

    Do we have a way of aligning a text inside a button?

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

    Great..Improve👍

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

    how to pass parameters to the function which will execute after button click?

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

    whats up guys. its john elder... we all come for this intro lol

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

    thank you

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

    Hello sir, I am facing a small issue while implementing the code. I have created the click button, but when I click, the command message is printing in my terminal and not inside Tkinker window. Can you please help me which this issue.

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

      rewatch the video and follow the directions exactly. There's no way what you're saying could possibly happen unless you radically changed the code from the video.

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

    How can we put picture in our button?
    Is that possible? 😅

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

      Yes. I have videos on that in the playlist

  • @stefanielion04
    @stefanielion04 9 месяцев назад

    in dutch we say y as the same as we say an egg, ei. So the joke is, if you smash an egg to a wall, the egg white and yolk will flow down. So thats the trick how i always get it xd. if you dont get it, search for the translation how we say y and egg.

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

    My button doesn't show any up or down state when I click on it. Im using the exact code in your buttons video, The command function works though. I'm using PyCharm on a Mac. Any ideas?

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

      After more testing, I needed to add "from tkinter.ttk import *" below the original "from tkinter import *". Maybe I'm running a later version?

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

      @@scot1711 no, version shouldn't have anything to do with it.

  • @user-pt7mv5tp1c
    @user-pt7mv5tp1c 3 года назад

    Thanks. Спасибо.

  • @Pablo-fo4em
    @Pablo-fo4em 4 года назад +2

    Howdy partner!

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

      Hello!

    • @Pablo-fo4em
      @Pablo-fo4em 4 года назад

      @@Codemycom I was wondering if you could please make another tkinter tutorial with the new python update

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

      @@Pablo-fo4em what new python update?

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

    Hi Mr. Elder, thank you for these great videos. I have a problem with my code in that I can't get the background color to take effect in the button. And the button doesn't depress like it should. Otherwise, all functionality is in place.
    Also I'm running on Mac OS. Thanks for any help.

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

      What does your button code look like?

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

      @@Codemycom have the same problem. My code is:from tkinter import *
      root = Tk()
      myButton = Button(root, text="Press me", fg="blue", bg="green")
      myButton.pack()
      root.mainloop()

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

      i had the same issue where it doesn’t press, all you have to do is click out of the tkinter window and click back in, as for the other one i have the same issue and dont know how to fix it

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

    Hello Mr. John and everybody.
    First, thank u for this tutorials. And my question : "How can i add two mission to one button. I mean, How can i add two command ? This is my question. Thank from now.

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

      Have the button command call a function, inside that function call another function

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

      @@Codemycom Hi sir, your lessons are extremely helpful. I watched many videos on youtube for Tkinter however, I was not able to understand them. Your lessons are very clear and concise. Just a query, can we bind multiple functions to one command?Thank youu:)

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

      @@prithikannan8568 you can add functions inside of functions in the normal python way you call any function

  • @tejas.winiii
    @tejas.winiii 2 года назад

    hey, almost nothing is working when I try to change the bg color of the button-neither the hex color codes or the color names. Is there anything I might've done wrong?

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

      Yeah, probably everything. The code must be exactly like mine...

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

    Thank

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

    Your video is very well explained.
    If I add a fews entries, then a value to each of them. How can I get each of the values and add them up?
    Here are the codes. Thanks
    from tkinter import *
    root=Tk()
    somme=0
    def add_button():
    global somme
    somme +=1
    for i in range(somme):
    lab1=Label(root, text='lab1')
    lab1.grid(row=i, column=1)
    entry1=Entry(root)
    entry1.grid(row=i, column=2)
    bouton_add=Button(root, text='Create widget', command=add_button )
    bouton_add.grid(row=5, column=0)
    root.mainloop()

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

      Keep watching the videos in this series, I go over all of that.

  • @numbred7462
    @numbred7462 8 месяцев назад

    Hello, the button works nicely but i'm facing a problem : I made it so when you click the button it makes you select a file and then it opens it. What i want is also the filePath to be stocked inside a global variable, but whenever I create a variable in the myClick function, I'm unable to reuse it outside of that function, any solution to that problem?

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

      make it global inside that function, define it globally there

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

    Thank you sir

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

    My button works , even though I forgot to add the root to it , can you explain why? I really don't understand what's happening.

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

    I am create a flutter app using my python code, so a simple app with a button that will open the python code. can you help?

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

      No, I don't have any videos like that

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

    at 6:18 when you click the button it adds to the previous line, how can I make it replace it instead?
    and great teaching, thanks ^^

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

      You can update anything with .config()

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

    Can someone help? Why does GitBash stop processing after one run of Python command?

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

      It doesn't stop...it is running your tkinter program. While it is running that program, it can't do anything else. Close the tkinter app and your gitbash will continue working.

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

    here is the thing.
    I have a label on the top and two buttons below that label. I also aligned them in the middle, like in the illustration below.
    MAIN MENU
    button1
    button2
    Now, I want to give space between that label and the buttons. And this is how I want it to look.
    MAIN MENU
    button1
    button2
    But each time I add "pady=50" in button 1, the output becomes like this.
    MAIN MENU
    button1
    button2
    Anyone, is there a way to modify the distance between button1 and button2? I want to keep the distance of my button1 now, what I want now is to move button 2 closer to button1. Please help me how to do it through a python tkinter code.

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

      You can pass a tuple to your pady that only gives padding on one side. so pady=(0,50) or pady=(50,0) that should do the trick.

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

    How can I create multiple buttons & assign them different commands??
    What basically is my problem that -
    I have a list wherein I have the text to be displayed on the buttons, & I want them to be displayed... And on clicking a particular button that button gets removed from the display...
    Please provide me a solution to this 🙏

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

      keep watching the videos in the playlist.

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

    yes, at 8 minutes, you are not calling the function (command=myClick) you are 'passing a reference of the myClick function to command, like assigning a value to a variable...'

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

      not really...you're calling the function...you're causing the function to be executed.

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

      @@Codemycom by the way, I like your videos and plan on working through the whole set, then I see what you have on codemy ...I'm an 'old school' c/c++ (college days...) coder trying to 'knock some rust off my skill set' thanks

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

    cool!

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

    thanks

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

      Welcome

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

      @@Codemycom Can you halp me in next video I write my problem into comment in next video

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

      @@skfungaming1308 only if it directly relates to the next video

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

    do you konw why I cannot click my button?

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

    Done

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

    i get this error help me :
    ERROR:
    File "C:/Users/Fahima/Desktop/MakingButton.py", line 1
    from tkinter import
    ^
    SyntaxError: invalid syntax
    MY CODE:
    from tkinter import
    root = Tk()
    mybutton = Button(root, Text="Click me ")
    mybutton.pack()
    root.mainloop()
    I use pycharm and i am not that good at codding i am just a beginner and i use python 3.8.5
    can someone help?

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

      line one is wrong. It should be
      from tkinter import *

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

    what if the button's command is a function that requires me to send a value? I can't use the bracket cus the function will just start. How should I do it? Or if u made a video about it can u link it to me pls

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

      use lambdas...yeah I've done videos on it. command=lambda: function_name(pass stuff)

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

    are Button, Label and others widgets classes or functions as you are saying in this video?

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

    John, do you have any guide for how to make buttons the same size/center the text? I'm having a hell of a time getting my buttons to be the same size (irrespective of the text inside), even with padx...

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

      No sorry...I mean, they wouldnt be the same size because it depends on the text and always will

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

      @@Codemycom Okay, thanks for answering.

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

    i have a question, i am planning to learn to program with a desktop application as my end goal, now heres the thing, for what i need this program to do it will use SVG extensively for the main interactive aspects, its going to be based on the LCARS interface which are basically single colours and very simple shapes, my question is can it be done, if you google LCARS you can see exactley what im looking at doing, i just dont want to invest a ton of time in a pointless excersise, why have i chosen to go down the SVG route, performance for one, efficiency for another and aesthetics, i hope you can answert this question.

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

      Sorry, I don't know what any of those things are...

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

    I was wondering why when I clicked the button on a Mac, the window flickers black for a second then turns to normal. I assume that this is just the window being updated, but I was wondering if there is anyway to get it to update smoothly like on windows.
    Also I can't seem to change the background color of the button and I was also wondering if that is just a system difference.

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

      No clue what's going on there...it should be smooth

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

      Codemy.com It seems that as I continued through the playlist, the flickering just stopped. Maybe it’s because the page was updating from the button being clicked and due to a system difference

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

    Can we display an already stored variable using label. For ex:
    var = 5
    label1 = label(root, text = var)
    Will it work
    Or what if i want to display the variable and some text?

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

      Yes it will work. But more importantly...you could have simply tried it yourself faster than it took to write this comment and wait for an answer. You can concatenate text = var + " some text" as long as they are the same data type (for instance, both strings).

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

      @@Codemycom thank you sir, actually I am quite new to GUI , and just watched the first three videos, so I wanted to clarify my doubts before I started to actually code, which I shall be doing shortly

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

      @@a_22_romitbhaumik89 cool

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

    I tried bg, but it didn't work for me. Any idea why?
    Here's my code: myButton = Button(root, text="Click Me!", command=myClick, fg="blue", bg="red")

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

      It should work. try activebackground= or background= or Background=

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

      Try using highlightbackground=“red” instead

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

    hey John, i just joined codemy and used the code here to get all the courses, however, i cant seem to find the tkinter in the list of courses? i'll just watch here while i wait for your response. Great content by the way! thanks!

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

      Hey Vince...the tKinter videos are exclusively on youtube.

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

      @@Codemycom Hey John! thanks for the response! i'll follow the training here then.. keep it up!

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

      @@vinceantonio777 sure thing!