How To Create Apps In Python Using Tkinter!

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024
  • This video show a demonstration on how to create a graphical user interface (GUI) using Python's Tkinter module. You can find out more about Tkinter by reading the docs here: docs.python.or...
    ⭐ Join my Patreon: / b001io
    💬 Discord: / discord
    🐦 Follow me on Twitter: / b001io
    🔗 More links: linktr.ee/b001io
    Background music:
    Pillow Fort by Purrple Cat | purrplecat.com
    Music promoted by www.free-stock...
    Creative Commons Attribution-ShareAlike 3.0 Unported
    creativecommon...

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

  • @kingofcastlechaos
    @kingofcastlechaos 11 หลายเดือนก่อน +10

    Just stumbled across your channel and LOVE IT! Finally a creator who understands how to use background music wisely. Learning a lot, thank you!

  • @histrion2
    @histrion2 ปีที่แล้ว +6

    Great intro! I'd like to see more about tkinter - maybe a follow-up with something that plays a small game or creates a calculator or utility or something?

  • @64imma
    @64imma 2 ปีที่แล้ว +5

    Thanks for the video! I've been wanting to work with tkinter again but it's been about a month since I last did a project with it.

    • @tecowski
      @tecowski 8 หลายเดือนก่อน

      What frameworks do you use on other projects, if i may ask

  • @HHJoshHH
    @HHJoshHH 2 ปีที่แล้ว +26

    Great job man. I'm on Python3 in Pycharm and it wouldn't let me use the "Brass 30 font." But this was a lot of fun!

    • @b001
      @b001  2 ปีที่แล้ว +14

      You’ll have to install the Brass Mono font. It’s not a preinstalled system font.

    • @HHJoshHH
      @HHJoshHH 2 ปีที่แล้ว +11

      @@b001 ahhh lol ty so much man! Really enjoyed your video!

  • @AddingAUsername
    @AddingAUsername 7 หลายเดือนก่อน +2

    Great video!!! This made me understand both classes and tkinter way better you're the king!!!!

  • @darrenlefcoe
    @darrenlefcoe 2 หลายเดือนก่อน

    A great well explained tutorial on the tkinter module...

  • @sapachino
    @sapachino 2 ปีที่แล้ว +3

    Thank you for the video! Very helpful! Keep it up

  • @migasgt638
    @migasgt638 2 ปีที่แล้ว +6

    Hey man, great video, just wondering, what is your VSCode theme? Yours looks much smoother.

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

      7:21 he says it here, hope you have an awesome day

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

      if ur talking about the font then check mrt8bit692's reply, but if ur referring to the colour scheme, its synthwave '84

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

      @@franzliszt4545 ahhhh I see, my apologies. Misread the question. Thanks!

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

    Thank you very so much b001 for this video clip for Python very hellp for me that's is so chill for beginners

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

    Great video! Very clear and professional!

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

    great vid, love the content and chill background music. you should maybe add this to your tutorial playlist...

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

    Do you think that one day, python will have and maintain its own X windowing system for GUI's?

  • @kuc5743
    @kuc5743 10 หลายเดือนก่อน +1

    Make a video about introspection and annotration in Python

  • @kapibara2440
    @kapibara2440 11 หลายเดือนก่อน +1

    Brilliant! Thank you ❤

  • @Kripibipi
    @Kripibipi 10 หลายเดือนก่อน +1

    ttk is needed for the combobox and cannot be grouped with tk widgets.

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

    Thanks for this, very helpful!

  • @turtleman9302
    @turtleman9302 9 หลายเดือนก่อน +2

    help the reverse text isn't working i put in "lonely tylenol" and it didn't work

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

    I havent seen the mainframe being elemented, if you had another frame (other_frame) for example, could you have a button click command or other call change the mainframe by simply swapping out other frames;
    For example i made a digital cleaning checklist app for work, and it had subsections of how often each job had to be done, and when you clicked on a button i would place forget the labels currently displayed then place the labels for the other subsection, could i have just created all the frames on the start up and just swap them out with changing the mainframe

  • @dingdongkornik9521
    @dingdongkornik9521 2 หลายเดือนก่อน

    very informative. thank you.

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

    Loved it! Thanks❤

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

    Very cool!
    Thank you.❤

  • @franzliszt4545
    @franzliszt4545 2 ปีที่แล้ว +3

    Hey, what font settings do you use because when I downloaded Brass Mono and installed it into vscode, it became really messy so I'm just wondering how to make it look like yours. Thanks!

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

    thank you for your sharing. Good job.

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

    Great 😃👍 but how could we implement this for a Mobile app??????

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

    @b001 have you ever used Ctk?

  • @Hitmandelr
    @Hitmandelr 2 หลายเดือนก่อน

    I get this error: "AttributeError: partially initialized module 'tkinter' has no attribute 'Tk' (most likely due to a circular import). Did you mean: 'tk'?" for some reason and tkinter works on the regularf python 3.11 app but not in visual studio, any fixes?

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

    Can you do a video on customtkinter?

  • @harisserdarevic4913
    @harisserdarevic4913 5 หลายเดือนก่อน

    I'm working on a mac and followed your code exactly, but for whatever reason the background color wasn't changing for me. My text just had a weird dark grey effect surrounding it, almost like the text, button, etc all were in "dark mode", while the rest of the frame was white

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

    So I have leant tkinter a while ago however I have been wondering how to make it look more modern

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

      There is an argument for removing borders on text boxes, and I think buttons too. It really cleans up the look of the interface.

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

    I can't seem to understand what the NWES was for. Could you help me out here. I didn't hear you explain that part. And thanks again!

    • @b001
      @b001  2 ปีที่แล้ว +3

      “NWES” means “North West East South” . You can do any combination of these and Tkinter will understand the same, such as “SWNE” “WES” “ESNW” “N” etc

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

      @@b001 I thought that’s what it meant but wasn’t sure. Thanks for all your replies!

  • @TheNeilsolaris
    @TheNeilsolaris 3 หลายเดือนก่อน

    I'm new to this, so this might be a silly question, but how would we go about using this app on our mobile phones?

  • @donista.brigida157
    @donista.brigida157 ปีที่แล้ว

    Thanks for the great tutorial Sir! Special request if you could show us sir as well how to deploy or run this as an app or exe file? I hope my question makes sense. Thanks a lot again!

  • @danielortiz-rb2dl
    @danielortiz-rb2dl 2 หลายเดือนก่อน

    There is a form you that You Can Work With HTML and python ?

  • @mrfriendlyghost5350
    @mrfriendlyghost5350 8 หลายเดือนก่อน

    tnx supper helpful and super easy to read tnx allot subbed and liked

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

    for some reason I get an error with "command=self.reverse". I get: Cannot access member "reverse" for type "App"
    Member "reverse" is unknownPylance
    or
    AttributeError: 'App' object has no attribute 'reverse'

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

      this should be the code in the mainloop:
      self.reverse_text = ttk.Button(self.mainframe, text='Reverse Text', command=self.reverse)
      self.reverse_text.grid(row=4, column=0, pady=10, sticky='NWES')
      this should be the function code:
      def reverse(self):
      newtext = self.text.cget('text')
      reversed = newtext[::-1]
      self.text.config(text=reversed)
      you might have forgot to define reverse, otherwise, idk

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

    It keeps saying bad option: “-command” must be: -column -columnspan,-in ……

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

    that was cool

  • @DhruvKumar-fd6rb
    @DhruvKumar-fd6rb 2 ปีที่แล้ว +1

    Helpful if you would mala a tutorial of tkinter library

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

      I was thinking the same thing...

  • @joauqinxd8560
    @joauqinxd8560 6 หลายเดือนก่อน

    what do i do if .pack() isnt recognized? (sorry for bad english)

    • @joauqinxd8560
      @joauqinxd8560 6 หลายเดือนก่อน

      already solver

  • @Hi-dn8pq
    @Hi-dn8pq 2 ปีที่แล้ว +1

    What font do you use?

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

    Hey can I run this in Pycharm? I ran it and got a text box and everything looked good but then I red X out of the text box and can't get it back.

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

      When you close out of the window, it doesnt stop the code. You’ll have to stop the code in PyCharm and re-run it

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

      @@b001 actually I was stopping it in Pycharm but the reason the text box wouldn’t reappear was bc of the font I didn’t have downloaded was throwing error messages. So as soon as I replaced it with “Times New Roman” it worked perfectly!

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

    what's your vs code theme

    • @b001
      @b001  2 ปีที่แล้ว +3

      SynthWave’84

  • @younscrafter7372
    @younscrafter7372 6 หลายเดือนก่อน

    10:14 why isn't it self.text_set_button?

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

    700th like… I don’t like that but it’s a multiple of 100

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

    Looks like python and html/css had a baby lol

  • @echokni62
    @echokni62 10 หลายเดือนก่อน

    How do i change the icon?

  • @azurestarton
    @azurestarton 10 หลายเดือนก่อน

    Thank you.

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

    how to make it full screen?

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

      give specific dimensions

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

    Okay i love u fr

  • @AdityaSharma-wg4rj
    @AdityaSharma-wg4rj ปีที่แล้ว +2

    Increase font sizr

  • @gedtoon6451
    @gedtoon6451 8 หลายเดือนก่อน

    Your demo would have looked better if you had added a 'pady' to your widgets.

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

    I stopped learning tkinter for textual.
    I am not sure if that's even true, but I had the impression tkinter was very bad for using anything but the absolut standard design.
    With textual you have css.
    Also since textual is so young, there are pretty much no tutorials. So if you feel like it, that would probably be helpful for quite a lot of people.

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

      Hey! I just got to know about textual from your comment and looked it up. It looks really good and maybe better than tkinter. Have you been working with it and did you find some resource to learn it?

  • @wenelol
    @wenelol 2 ปีที่แล้ว +20

    tkinter is pain

    • @Aidanbaro
      @Aidanbaro 5 หลายเดือนก่อน

      No it's eazy try to code a project bro then you will feel better about tkinter

    • @wenelol
      @wenelol 5 หลายเดือนก่อน

      @@Aidanbaro I have and it was pain.

    • @Yo_1010
      @Yo_1010 4 หลายเดือนก่อน +4

      no pain, no gain

    • @aidanrafferty6189
      @aidanrafferty6189 3 หลายเดือนก่อน

      @@Aidanbaroyo same name same spelling bro also a fan of Minecraft let’s goo

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

    pass the code please

  • @awildmoose6798
    @awildmoose6798 6 หลายเดือนก่อน

    If this is an intro video about tkinter, why make it more complicated by putting in a class? Why not just make it as simple as possible and avoid the class altogether

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

    Random Name Picker With tkinter:
    import random
    import keyboard
    from tkinter import *
    def welcome():
    wel_tx = Label(root,text="WELCOME",bg="gold")
    wel_tx.pack()
    def names():
    list = ['Daniel','Dawn','Dean','Dan']
    list = random.choice(list)
    print(list)
    root = Tk()
    root.title("Random Name Choice")
    root.geometry("400x400")
    root.resizable(False,False)
    root.configure(bg="gray")
    quit_button = Button(root,text="QUIT",bg="red",command=exit)
    quit_button.pack()
    play_button = Button(root,text="PICK RANDOM NAME",bg="green",command=names)
    play_button.pack()
    wel_button = Button(root,text="CLICK ME!!!",bg="gold",command=welcome)
    wel_button.pack()
    root.mainloop()
    while True:
    if keyboard.is_pressed('q'):
    break

  • @erkakb
    @erkakb 2 หลายเดือนก่อน

    2:03 that moment when the narrator says 'I have a video on this...' but gives no link...😖 and expect you to find it within over 100+ videos
    found it tho😮‍💨th-cam.com/video/o4XveLyI6YU/w-d-xo.html