No video

Learn Python tkinter labels easy 🏷️

  Рет қаралды 36,790

Bro Code

Bro Code

Күн бұрын

Python label labels tkinter GUI code example tutorial for beginners
#Python #label #labels #tkinter #GUI #code #example #tutorial for #beginners
from tkinter import *
label = an area widget that holds text and/or an image within a window
window = Tk()
photo = PhotoImage(file='person.png')
label = Label(window,
text="bro, do you even code?",
font=('Arial',40,'bold'),
fg='#00FF00',
bg='black',
relief=RAISED,
bd=10,
padx=20,
pady=20,
image=photo,
compound='bottom')
label.pack()
#label.place(x=0,y=0)
window.mainloop()

Пікірлер: 85
@BroCodez
@BroCodez 4 жыл бұрын
from tkinter import * # label = an area widget that holds text and/or an image within a window window = Tk() photo = PhotoImage(file='person.png') label = Label(window, text="bro, do you even code?", font=('Arial',40,'bold'), fg='#00FF00', bg='black', relief=RAISED, bd=10, padx=20, pady=20, image=photo, compound='bottom') label.pack() #label.place(x=0,y=0) window.mainloop()
@darphaprothon20
@darphaprothon20 2 жыл бұрын
raise RuntimeError(f"Too early to {what}: no default root window") RuntimeError: Too early to create image: no default root window error in line 7 (photo = PhotoImage(file='person.png'))
@stickydamper
@stickydamper 3 жыл бұрын
I am confident this channel gonna explode within the next few months. Great content for beginners....
@tweenTowuuRRS
@tweenTowuuRRS 2 ай бұрын
You were right 🤧🥶
@ji23delgado
@ji23delgado 3 жыл бұрын
Yup, this is such a good video You deserve to be one of those programming youtubers at the top
@harlanshafer3429
@harlanshafer3429 8 ай бұрын
This lesson was really cool. And it appears to be only the beginning. Definitely two thumbs up.
@denisbleta5661
@denisbleta5661 Жыл бұрын
amazing tutorial, bro you're videos are helpping me with school very much thanks
@sourabhkamat8943
@sourabhkamat8943 Жыл бұрын
this is the best tutorial.. 😍😍😍😍
@kristijanlazarev
@kristijanlazarev 6 ай бұрын
SO COOL
@solomononuchefaruna5022
@solomononuchefaruna5022 6 ай бұрын
I am already in love with you and your teaching style. This is the best video tutorial I have watched on KZbin
@grass8388
@grass8388 2 жыл бұрын
Ive been trying for ages to get an image on a button and even tho u explained how to do it on a label. It was so simple I could do it on a button as well. Thanks bro
@ThisOldMan714
@ThisOldMan714 Жыл бұрын
I have been looking for someone like you for a long time. Thank you for all of this work you have been doing.
@thilokasurantha2266
@thilokasurantha2266 3 жыл бұрын
VERY GOOD SERIES
@Sheharyar69420
@Sheharyar69420 Ай бұрын
Wow!
@rajansikarwar3500
@rajansikarwar3500 9 ай бұрын
thanks big bro
@oliver2516
@oliver2516 2 жыл бұрын
This error always comes up in my terminal: _tkinter.TclError: couldn't recognize data in image file I've written it all over again and all the solutions on the internet are just changing the image type, which I did but it still doesn't work
@justmahsongsacc7853
@justmahsongsacc7853 2 жыл бұрын
same
@Programmaker-f2x
@Programmaker-f2x 11 күн бұрын
This video helped me a lot
@d1jn
@d1jn 2 жыл бұрын
Thanks, simple and efficient as always.
@engr.malikiftikharahmad8751
@engr.malikiftikharahmad8751 9 ай бұрын
superb
@saadbinmohsin1848
@saadbinmohsin1848 10 ай бұрын
thanks bro
@Leo-dw6gk
@Leo-dw6gk Жыл бұрын
Thank Bro you help me alot
@rubenc4696
@rubenc4696 3 ай бұрын
Thanks
@mahmouda.khalifa
@mahmouda.khalifa 3 жыл бұрын
you are so underrated keep the good work going man
@BroCodez
@BroCodez 3 жыл бұрын
thank you Mahmoud!
@AdityaVerma-vy2en
@AdityaVerma-vy2en 29 күн бұрын
Thanks
@thaonhiangnguyen1855
@thaonhiangnguyen1855 2 жыл бұрын
Love your tutorial
@HussainAli-sb1dv
@HussainAli-sb1dv 9 ай бұрын
love u
@Joshua_t_
@Joshua_t_ Жыл бұрын
cool
@philtoa334
@philtoa334 3 жыл бұрын
Good.
@koback97
@koback97 Жыл бұрын
Ty
@adityarathi915
@adityarathi915 10 ай бұрын
Great information ❤❤
@lw9954
@lw9954 2 жыл бұрын
Bro's 2021 voice compared to his 2020 voice sounds like he put on 30 kg of muscle and truly became the gigachad as we know him today. Based
@sumanlamichhane369
@sumanlamichhane369 2 жыл бұрын
Hi there! Photo image is not working for me, IDK why? until I did this import PIL as P import PIL.ImageTk as ptk pic = "C:\filepath" buttonImage = P.Image.open(pic) buttonPhoto = ptk.PhotoImage(buttonImage) Can someone explain me why is this and why not am able to use BRO CODE for images???😕😕😕😕😕😕
@truquichan
@truquichan 11 ай бұрын
Great!
@dhanrajhuli2931
@dhanrajhuli2931 6 ай бұрын
Nice tutorial
@DROR19801
@DROR19801 Жыл бұрын
amazing tutorials thanks!
@uuhju7004
@uuhju7004 3 жыл бұрын
nice video
@voidgaming1402
@voidgaming1402 Жыл бұрын
Really good
@user-lg5dz8sz4o
@user-lg5dz8sz4o 11 ай бұрын
💛
@jhassee
@jhassee Жыл бұрын
thanks a mil
@Amir_Plays_non_stop
@Amir_Plays_non_stop 3 жыл бұрын
Just remember me when you become famous
@UnknownGamer-lw7zp
@UnknownGamer-lw7zp 14 күн бұрын
.
@beingzero7541
@beingzero7541 2 жыл бұрын
Wow!
@piotrkopcewicz5227
@piotrkopcewicz5227 Жыл бұрын
AWESOME!!(sorry fo shouting, i hope i wasn"t too loud)
@VenkiTotad
@VenkiTotad Жыл бұрын
nice bro
@ronaldjsc1849
@ronaldjsc1849 2 жыл бұрын
I still can't figure it out how to add pictures to pycharm I'm using a Mac :/
@EissaAlahdul
@EissaAlahdul 2 жыл бұрын
شكرا
@SuperStarEevee
@SuperStarEevee 2 жыл бұрын
Thank you!
@gustavoaponte1814
@gustavoaponte1814 Жыл бұрын
Meow~! :3
@arpanshah355
@arpanshah355 Жыл бұрын
i dropped a comment
@hamzazad5258
@hamzazad5258 5 ай бұрын
well, "Hello World!"
@janellemcbride4364
@janellemcbride4364 9 ай бұрын
He has nuclear launch codes in his computer... I trust him with that information more than the government
@ilordepic
@ilordepic 2 жыл бұрын
Damn thanks bro
@madhubabu-hq4yc
@madhubabu-hq4yc 10 ай бұрын
For me compound and image arguments are hating each other. If I use them individually they are working well , but not together. Any reason.? I am using mac Os this the reason ?
@dfg2304
@dfg2304 2 жыл бұрын
blabla for you bro
@Lulululu_Kitty
@Lulululu_Kitty 2 жыл бұрын
Hi Bro, I have a problem when I try to display both text and image. After I typed in compound='bottom', both of text and image disappears and leave a blank space with the border (which I suppose is the same size as if they are still there?). I cannot figure out what going run.
@user-ux2jl5ly2f
@user-ux2jl5ly2f 2 жыл бұрын
I have the same problem. Still don't know what to do. Did you find the solution?
@Lulululu_Kitty
@Lulululu_Kitty 2 жыл бұрын
@@user-ux2jl5ly2f Not really
@jl7310
@jl7310 2 жыл бұрын
remove the "relief = RAISED," and it will work, dont know why had the same problem
@dylanwatson7331
@dylanwatson7331 Жыл бұрын
Hey there! I'm on a Mac, and it has to do with the relief option. You have five options for relief: FLAT, RAISED, SUNKEN, GROOVE, RIDGE. RAISED and SUNKEN will not work when combining both the photo and the text. GROOVE, FLAT, and RIDGE should work if you choose those options instead.
@IsraelZavala
@IsraelZavala Жыл бұрын
@@dylanwatson7331 Thank you for this comment
@sepgorut2492
@sepgorut2492 2 жыл бұрын
For some reason my label didn't expand to the size of the text / photo
@Adamelamine
@Adamelamine 2 жыл бұрын
drop a comment down below
@LimeSpeedCrystal
@LimeSpeedCrystal Жыл бұрын
Wait, I can't make labels!😭 Couldn't I!?
@abdulhayrahmonov-lw5mj
@abdulhayrahmonov-lw5mj 9 ай бұрын
how I can dowland phyton
@arohonyinyechi-xo8vz
@arohonyinyechi-xo8vz Жыл бұрын
Can community pycharm import pictures
@asgeraagaard4649
@asgeraagaard4649 Жыл бұрын
Traceback (most recent call last): File "C:\Users\Asger\PycharmProjects\pythonProject\main.py", line 1347, in window = Tk() NameError: name 'Tk' is not defined ' WHY does this happen
@Demiduce1
@Demiduce1 Жыл бұрын
I know this video is old, but I have a question. How do you print the label?
@BJChannel-vz8eb
@BJChannel-vz8eb 2 ай бұрын
print("label name")
@chudaprasadparajuli3072
@chudaprasadparajuli3072 3 жыл бұрын
_tkinter.TclError: couldn't recognize data in image file I got this error even after i copy and paste the same code of you and change the photo name to person.png. Please help me out on this.
@jeevanpranav6877
@jeevanpranav6877 3 жыл бұрын
i had this problem too u can solve this by installing PIL by typing "pip install Pillow" in command prompt then in your code import it as: from PIL import ImageTk, Image then where ever you use PhotoImage, you instead use ImageTk.PhotoImage() it will definetlely work. Glad to help
@chudaprasadparajuli3072
@chudaprasadparajuli3072 3 жыл бұрын
@@jeevanpranav6877 Thank's for your response bro. i find out that there should be always png image. if using other image formats you need to import and do lots of other stuffs that you've mentioned too.
@cristiucvladimir7909
@cristiucvladimir7909 4 ай бұрын
Bro, do you even code?
@joyedet1363
@joyedet1363 2 жыл бұрын
Bro, are you sure you know how to code?😊
@NOTHING-en2ue
@NOTHING-en2ue Жыл бұрын
d
@billgreen9168
@billgreen9168 Жыл бұрын
NUCLEAR LAUNCH CODES????!!!???!!!???
@rares_9947
@rares_9947 2 жыл бұрын
coment
@paolotolentino505
@paolotolentino505 9 ай бұрын
Traceback (most recent call last): File "C:\Users\PC\PycharmProjects\pythontutorial\adv\labels.py", line 7, in photoes = PhotoImage(file='tow.jpg') ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 4130, in __init__ Image.__init__(self, 'photo', name, cnf, master, **kw) File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 4075, in __init__ self.tk.call(('image', 'create', imgtype, name,) + options) _tkinter.TclError: couldn't recognize data in image file "tow.jpg" this happens when i try to display images why bruh
@SZAJZA1916
@SZAJZA1916 6 ай бұрын
I have same problem, did you find a solution?
@paolotolentino505
@paolotolentino505 6 ай бұрын
@@SZAJZA1916 try switching from jpg images to PNG images
@SZAJZA1916
@SZAJZA1916 6 ай бұрын
Actually i converted my file to png and my issue was solved
@Someone_creates_animation
@Someone_creates_animation 4 ай бұрын
Dayy1 gui
@orfredymelobeltran5237
@orfredymelobeltran5237 2 жыл бұрын
Thanks
@Someone_creates_animation
@Someone_creates_animation 4 ай бұрын
Dayy1 gui
Learn Python tkinter GUI buttons easy 🛎️
11:40
Bro Code
Рет қаралды 76 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 302 М.
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Wian
Рет қаралды 15 МЛН
Whoa
01:00
Justin Flom
Рет қаралды 54 МЛН
Nurse's Mission: Bringing Joy to Young Lives #shorts
00:17
Fabiosa Stories
Рет қаралды 14 МЛН
Python tkinter setup a basic GUI 🐍
8:07
Bro Code
Рет қаралды 70 М.
Learn Python With This ONE Project!
55:04
Tech With Tim
Рет қаралды 1,8 МЛН
Learn Python tkinter GUI progress bars easy 📊
10:39
Bro Code
Рет қаралды 59 М.
Python GUI Development With PySimpleGUI
15:15
Real Python
Рет қаралды 1 МЛН
Let's code a SNAKE GAME in python! 🐍
33:06
Bro Code
Рет қаралды 609 М.
Learn Python tkinter GUI listboxes easy 📋
15:00
Bro Code
Рет қаралды 21 М.
Python Tkinter  Beginner - Images in Labels
10:08
Thinking Through Code
Рет қаралды 1,3 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,5 МЛН
Make Tkinter Look 10x Better in 5 Minutes (CustomTkinter)
4:40
TurbineThree
Рет қаралды 288 М.
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Wian
Рет қаралды 15 МЛН