Exercise 1: Creating Newspaper GUI | Python Tkinter GUI Tutorial In Hindi #7

preview_player
Показать описание


Best Hindi Videos For Learning Programming:

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

Bro what do you thing of the pybee project. I really like the philosophy behind toga gui framework: a box within a box

santanugoswami
Автор

sir i hit thumbs up and wrote a comment.

rishi
Автор

I just failed your 1st challenge (that pycharm one) rest all done!☺

jacktandel
Автор

Exercise Completed

from tkinter import *
from PIL import Image, ImageTk

base = Tk()
base.title("Yuniek's Newspaper")
base.geometry("1180x644")
base.minsize(width=300, height=300)

# Header for newspapaer
Header = Frame(base, bg="grey", borderwidth=5, relief=SUNKEN)
Header.pack(side=TOP, fill=X)
t = Label(Header, text="Yuniek's Newspaper", bg="grey", font="Arial 19 bold italic")
t.pack()

# News 1
f1 = Frame(base, bg="lightblue", borderwidth="3", relief=SUNKEN, highlightbackground="black", highlightthickness=1.5)
f1.pack(fill=X, anchor='nw')

p1 = Image.open("1.jpg")
P1 = ImageTk.PhotoImage(p1)

l1 = Label(f1, image=P1, width=130, height=130)
l1.pack(side=LEFT)
l12 = Label(f1, text='''Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.[32]
Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming.
It is often described as a "batteries included" language due to its comprehensive standard library.''', bg="lightblue", )
l12.pack()

# News 2
f2 = Frame(base, bg="lightblue", borderwidth="3", relief=SUNKEN, highlightbackground="black", highlightthickness=1.5)
f2.pack(fill=X, anchor='nw')

p2 = Image.open("2.jpg")
P2 = ImageTk.PhotoImage(p2)

l2 = Label(f2, image=P2, width=130, height=130)
l2.pack(side=LEFT)
l22 = Label(f2, text='''Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.[32]
Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming.
It is often described as a "batteries included" language due to its comprehensive standard library.''', bg="lightblue", )
l22.pack()

# News 3
f3 = Frame(base, bg="lightblue", borderwidth="3", relief=SUNKEN, highlightbackground="black", highlightthickness=1.5)
f3.pack(fill=X, anchor='nw')

p3 = Image.open("3.jpg")
P3 = ImageTk.PhotoImage(p3)

l3 = Label(f3, image=P3, width=130, height=130)
l3.pack(side=LEFT)
l32 = Label(f3, text='''Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.[32]
Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming.
It is often described as a "batteries included" language due to its comprehensive standard library.''', bg="lightblue", )
l32.pack()

# News 4
f4 = Frame(base, bg="lightblue", borderwidth="3", relief=SUNKEN, highlightbackground="black", highlightthickness=1.5)
f4.pack(fill=X, anchor='nw')

p4 = Image.open("4.jpg")
P4 = ImageTk.PhotoImage(p4)

l4 = Label(f4, image=P4, width=130, height=130)
l4.pack(side=LEFT)
l42 = Label(f4, text='''Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.[32]
Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming.
It is often described as a "batteries included" language due to its comprehensive standard library.''', bg="lightblue", )
l42.pack()

base.mainloop()

yuniekanand
Автор

I completed your 129 python Videos
And now I am gonna start this playlist...
And as a singer I would like to dedicate one song for you
Ak Tu Hi Bharosaa AK Tu Hi Sahaara 🤓❤️
Thanks a million 😍🤓

simmimishra
Автор

Please make a complete course on madical Lab laboratory test report software

MAZDigitalAgency
Автор

Yaa offcourse, I accept the challenge 👍

kumarrahul
Автор

Not using the news, rather used natural sceneries

from tkinter import *
from PIL import Image, ImageTk


window = Tk()
window.geometry("1366x768")
window.title('Welcome to Tkinter')




i1 =
i1 = i1.resize((270, 150))
i2 =
i2 = i2.resize((270, 150))
i3 =
i3 = i3.resize((270, 150))
i4 =
i4 = i4.resize((270, 150))
i5 =
i5 = i5.resize((270, 150))

pi1 = ImageTk.PhotoImage(i1)
pi2 = ImageTk.PhotoImage(i2)
pi3 = ImageTk.PhotoImage(i3)
pi4 = ImageTk.PhotoImage(i4)
pi5 = ImageTk.PhotoImage(i5)


t1 = Label(window, text='Green Jungle')
t2 = Label(window, text='Blue Sky')
t3 = Label(window, text='Thunderbolt on Monument')
t4 = Label(window, text='Rainbow above the Mountains')
t5 = Label(window, text='Beautiful Night')


l1 = Label(window, image=pi1)
l1.grid(row=0, column=0)
t1.grid(row=0, column=1)

l2 = Label(window, image=pi2)
l2.grid(row=1, column=0)
t2.grid(row=1, column=1)

l3 = Label(window, image=pi3)
l3.grid(row=2, column=0)
t3.grid(row=2, column=1)

l4 = Label(window, image=pi4)
l4.grid(row=0, column=2)
t4.grid(row=0, column=3)

l5 = Label(window, image=pi5)
l5.grid(row=1, column=2)
t5.grid(row=1, column=3)

window.mainloop()

adityamaurya
Автор

from time import strftime
from tkinter import *
date = strftime('%A, %B %d, %Y')
articesNumber = 10
root = Tk()
root.title(f'theCamelCase')
root.geometry('700x700')
root.minsize(650, 650)
headLabel = Label(
master=root,
text='theCamelCase',
font=('Microsoft YaHei Light', 40, 'bold'),
bg='black',
fg='white'
).pack(
side=TOP,
fill=X
)
dateLabel = Label(
master=root,
text=date,
font=('Microsoft YaHei Light', 20, 'bold'),
bg='white',
fg='gray'
).pack(
side=TOP,
anchor=NE
)
for articeNumber in range(1, articesNumber):
imageFile = PhotoImage(

imageFile = imageFile.subsample(34)
with as target:
textData = target.read()
picLabel = Label(
master=root,
image=imageFile
).pack(
side=TOP
)
textLabel = Label(
master=root,
text=textData,
bg='black',
fg='white',
font=('Microsoft YaHei Light', 4, 'bold'),
).pack(
fill=Y,
side=TOP
)
root.mainloop()

felon_loser
Автор

Sir PhotoImage method kaam nhi kr rha hai... To pillow ki help se krta hu...

deepaktiwari-ryyo
Автор

from tkinter import *
root=Tk()
root.geometry("900x600")
root.maxsize(900, 600)
root.minsize(900, 600)
a = Label(text="THE ENEWSPAPER", bg='blue', fg='white', font=("comicsans", 14))
a.pack(side=TOP, fill=X)
photo=PhotoImage(file=r"C:\Users\Abhay\OneDrive\Desktop\1.png", width=400, height=479)
b = Label(image=photo)
b.pack()
c = Label(text="So these are some latest news about following picture")
c.pack()
root.mainloop()

deviledgamingvlogs
Автор

Sir socket kab sikhayange aurr me kossis karta hu

skpandeyg
Автор

Here is the code :
from tkinter import *

root = Tk()
root.geometry("900x400")
root.title('My First GUI Application')
root.minsize(300, 100)
footer = Label(text="My First GUI Application with CodeWithASMR", bg='blue', font='comicsansms 9 bold')
footer.pack(side='bottom', fill='y')
root.mainloop()

Sci-fi_gamer_offical
Автор

Challenge Accepted i accept your channel broh

KagszOnTop
join shbcf.ru