Learn Python tkinter GUI grid layouts easy 🏢

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

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

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

    from tkinter import *
    #grid() = geometry manager that organizes widgets in a table-like structure in a parent widget
    window = Tk()
    titleLabel = Label(window,text="Enter your info",font=("Arial",25)).grid(row=0,column=0,columnspan=2)
    firstNameLabel = Label(window,text="First name: ",width=20,bg="red").grid(row=1,column=0)
    firstNameEntry = Entry(window).grid(row=1,column=1)
    lastNameLabel = Label(window,text="Last name: ",bg="green").grid(row=2,column=0)
    lastNameEntry = Entry(window).grid(row=2,column=1)
    emailLabel = Label(window,text="email: ",bg="blue").grid(row=3,column=0)
    emailEntry = Entry(window).grid(row=3,column=1)
    submitButton = Button(window,text="Submit").grid(row=4,column=0,columnspan=2)
    window.mainloop()

  • @murilosilvestre7736
    @murilosilvestre7736 3 ปีที่แล้ว +7

    I just started coding 3 months ago and my first language was java and i learned with you, with your 12 hour course, then javaScript same thing(html,css also), now I am finishing the python one, i am happy i am building some things already, cheers from Brazil, thank you (c++ too;) )

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

    Great video bhaiya ❤❤(🇬🇧🇺🇸:-bro;
    🇮🇳:-bhaiya)

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

      thanks for watching E Com

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

      @@BroCodez but sir i have a question, how i add password label

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

      @@antaripchatterjee like when the characters are hidden in a password?

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

      @@BroCodez yes yes..

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

      @@BroCodez entry. config(show="*") ???

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

    lovely

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

    How can I get a value from an entry if I use grid?

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

      You can do it in at least two ways. I used both in the code below
      def submit():
      print(entryvalue.get())
      print(lastNameEntry.get())
      # grid() = geometry manager that organizes widget in a table-like structure in a parent display
      window = Tk()
      entryvalue = StringVar()
      # .grid() returns None so the variables are not useful
      Label(window, text="First name: ").grid(row=0, column=0)
      Entry(window, textvariable=entryvalue).grid(row=0, column=1)
      Label(window, text="Last name: ").grid(row=1, column=0)
      lastNameEntry = Entry(window)
      lastNameEntry.grid(row=1, column=1)

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

    loving this course, Bro, make a course about Django please, we will love it

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

    Shahzod Sayfiddinov
    hace 2 meses
    Thank you Bro!
    Thank you so much

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

    the best

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

    This is the video I have been looking for!

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

    Hello, thanks for the infos and effort :)

  • @hydarhydar2338
    @hydarhydar2338 14 วันที่ผ่านมา

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

    Hi, how use grid() for radiobutton?

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

    hello bro thank you

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

    Aprecciate!

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

    Thank you Bro!

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

    great !!

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

    I thought you will be resting after the last marathon 😜

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

      not at all! I have lots of motivation still

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

      😇😇😇😇, that's you

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

      thanks Mon Wil, you guys keep me going
      👊

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

    AMAZING!!! 🤩

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

    My code is not working and it's not showing any errors

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

    comment to support😀