Learn Python tkinter GUI scales easy 🌡️

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.พ. 2025

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

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

    from tkinter import *
    def submit():
    print("The temperature is: "+ str(scale.get())+ " degrees C")
    window = Tk()
    hotImage = PhotoImage(file='hot.png')
    hotLabel = Label(image=hotImage)
    hotLabel.pack()
    scale = Scale(window,
    from_=100,
    to=0,
    length=600,
    orient=VERTICAL, #orientation of scale
    font = ('Consolas',20),
    tickinterval = 10, #adds numeric indicators for value
    #showvalue = 0, #hide current value
    resolution = 5, #increment of slider
    troughcolor = '#69EAFF',
    fg = '#FF1C00',
    bg = '#111111'
    )
    scale.set(((scale['from']-scale['to'])/2)+scale['to']) #set current value of slider
    scale.pack()
    coldImage = PhotoImage(file='cold.png')
    coldLabel = Label(image=coldImage)
    coldLabel.pack()
    button = Button(window,text='submit',command=submit)
    button.pack()
    window.mainloop()

  • @Astro.-yc6lb
    @Astro.-yc6lb 2 วันที่ผ่านมา +1

    Hello brother, I've seen all your videos about the basics of python and I'm continuing the videos about tkinter. Thank you for making these videos very simple to understand, you see I was considering suicide for a few reasons some months ago, thanks to your videos I'm trying to "get better" at python ad possibly getting a job as a programmer. Thank you again friend

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

    another perfect tutorial!! thanks as always :)

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

    GREAT VIDEO

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

    I❤ the bro code tutorials

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

    Hey Bro of codes 🙂
    first of all thank you for your great content👌
    As a newbie in the python world could you please give me a tip how to use the generated number values in a function to setup the brightness of a RGB-LCD.
    Many thanks in advance 🍻
    Cheers

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

    great tutorial :) but a question , when you creating a label object why you didn't insert the master "window" ?

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

    great video!

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

    Because;;; I like the video 👍

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

    Great!

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

    bro it is very usefull

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

    just curious: Why have you stopped using f strings this late in the tutorials?? 😵‍💫 did we go back in time or something?

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

    thanks

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

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

    Ty bro!

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

    Wow!

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

    thank u

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

    شكرا

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

    i couldnt add the images properly, there is a huge space between the images and the scale isk how to fix that :(

  • @ba.youtube1007
    @ba.youtube1007 3 ปีที่แล้ว +1

    Hello Brocode, How can i resize the image fire and snowflakes? mine is so big

    • @ba.youtube1007
      @ba.youtube1007 3 ปีที่แล้ว

      nvm I just used photoshop to resize the image i have downloaded but I can accept any programing tips to resize it directly on pycharm...
      P.S.: i tried installing pillow or PIL module but I cant import it now matter what i do

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

      @@jamesorpilla actually pycharm can install it for you!
      go to file--> setting--> project --> python interpreter
      and click on the + button and search for PIL and click install.
      then you can import

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

      1. to file explorer then type in png, then you will see the image of the hot and cold.
      2.click the image click the 3 dots. Then, you will see resize image
      But only works on windows

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

    u play game , noice

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

    yup

  • @2907Prashantyerunkar
    @2907Prashantyerunkar 2 ปีที่แล้ว

    how to copy the code and from where ?

  • @adam-vip
    @adam-vip 3 ปีที่แล้ว

    👍

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

    meow meow meow~!

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

    Tripta

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

    I'd like to make an 8 channel mixing board. How would I install more slide bars? Is there a separate command for that, or would I just reiterate something like in the video? Thx

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

    I CANT FIND THE SCALE OPTION IN MY PYCHARM WHY ??

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

    so i was lazy copy the code and remplece the hot and cold img for the pizza and hotdog XD

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

      lol, I never thought about food on a sliding scale 🤔

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

    This is a 100 on my scale

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

    y

  • @pet.me102
    @pet.me102 ปีที่แล้ว +1

    Lol you didn't explain resolution, you edit skipped it 😂