ListBox In Tkinter| Python Tkinter GUI Tutorial In Hindi #21

ListBox In Tkinter| Python Tkinter GUI Tutorial In Hindi #21

CodeWithHarry

5 лет назад

33,457 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Anmol Singh
Anmol Singh - 30.07.2023 10:47

nice

Ответить
༒LoneͥWOͣlͫf༒
༒LoneͥWOͣlͫf༒ - 25.02.2023 15:25

Nice video Harry bhai!! Thanks a lot for this one...

Ответить
crazy star
crazy star - 08.12.2022 17:40

Hey harry.....I got a issue in global variable
When I run it, error message of nameerror is shown:"name i is not defined"

What's the issue man reply quickly please....
I am jaya and started watching your video from few days help me to resolve this issue.

Ответить
Imran Ali
Imran Ali - 08.10.2022 08:14

Harry tum kitny phosi ho yaar, mooli walay prathay jesi

Ответить
M Ali Zaib Official
M Ali Zaib Official - 28.08.2022 18:06

Please make a madical Lab laboratory test report software

Ответить
Adarsh Santoria
Adarsh Santoria - 18.06.2022 15:36

Sir you are amazing at teaching , please taught some more stuffs and share some of excellent gui made by you.

Ответить
PADHAI KA AMPLIFIER
PADHAI KA AMPLIFIER - 05.06.2022 20:55

Thank YOu

Ответить
Vishal patlan
Vishal patlan - 23.05.2022 11:22

Hello Harry brother

Ответить
Thakurart Art
Thakurart Art - 17.03.2022 14:34

Thanku harry bhai

Ответить
Rahul Yadav
Rahul Yadav - 08.01.2022 13:31

Chumeshwari Videos Bhai!!
"Ek student ka koi bhi subject tab sabse favourite ban jaata hey jab uska usme interest ho lekin agar teacher agar aur bhi achha mil gaya to bhai sone pe suhaga ho jaata hey"

Ответить
MR TUTORIALS
MR TUTORIALS - 21.11.2021 10:55

# === Listbox ===
from tkinter import *
from tkinter import font


root = Tk()
root.geometry("455x322")
root.title('Listbox')

i = 1
def add_val(event):
t1 = Label(root, text="Write here")
t1.pack(padx=50, pady=14)

def AddToList():
global i
lst1.insert(END , f"{i}.{widget1.get()}")
i += 1
widget1 = Entry()
widget1.pack(pady=9)
b2 = Button(root, text="Add", command=AddToList)
b2.pack()


lst1 = Listbox(root)
lst1.pack()
lst1.insert(END, "TO DO LIST")

b1 = Button(root, text="Add Item")
b1.pack()

b1.bind('<Button-1>', add_val)
root.mainloop()

A little bit better program

Ответить
Prashant V
Prashant V - 28.09.2021 18:50

Added two buttons 1. Add Items to ListBox 2. Sort ListBox

from tkinter import *

def add():
my_listbox.insert(ACTIVE, f'{userentry.get()}')

def sort_list():
"""
function to sort listbox items case insensitive
"""
temp_list = list(my_listbox.get(0, END))
temp_list.sort(key=str.lower)
# delete contents of present listbox
my_listbox.delete(0, END)
# load listbox with sorted data
for item in temp_list:
my_listbox.insert(END, item)

root = Tk()
root.geometry('500x500')
root.title('List Box Tutorial')
root.resizable(False, False)


my_listbox = Listbox(root)
my_listbox.pack()
my_listbox.insert(END, 'Accounting')

user_value = StringVar()
userentry = Entry(root, textvariable=user_value)
userentry.pack(pady=10)

Button(root, text='Add to ListBox', command=add).pack(pady=20)
Button(root, text='Sort ListBox', command=sort_list).pack()



root.mainloop()

Ответить
Binyameen Pehlari
Binyameen Pehlari - 21.07.2021 17:35

cant imagine which 6 disliked the video

Ответить
song series
song series - 05.06.2021 19:03

Woooooow

Ответить
Rishabh Kumar
Rishabh Kumar - 18.05.2021 16:33

..😂

Ответить
Learn Prince
Learn Prince - 17.05.2021 16:42

My code is right but not write in txt file solve this question sir
from tkinter import *
import tkinter.messagebox
root = Tk()
root.title("Feedback By Costumber")
root.geometry("400x400")
Label(root, text="Give feedback for food?").pack()
myslider = Scale(root, from_=0, to=10, orient=HORIZONTAL)
myslider.pack()
def submit():
print(f"Thank you for give feedback {myslider.get()} ")
b1= Button(root, text='Submit Your Feedback', command=submit).pack()

for i in range (0, 11):
f = open("feedback_Costumer.txt", "a")
with open("feedback_Costumer.txt","w") as f:
f.write(f"Thank You for give feedback {i}\n")
f.write('\n')
f.close()









root.mainloop()

Ответить
Tiger Zinda Hai
Tiger Zinda Hai - 23.04.2021 12:35

Love you Sir

Ответить
PLASMA LIFE
PLASMA LIFE - 11.04.2021 18:49

❤️

Ответить
Vaibhav
Vaibhav - 15.03.2021 09:59

Harry Bhaia maja aa gaya.

Ответить
Vvhj
Vvhj - 29.01.2021 14:15

Love from Bangladesh 🇧🇩

Ответить
Himanshu Goyal Personal
Himanshu Goyal Personal - 04.01.2021 21:35

Sir can u plss tell me about f string how where what is the use?
@CodeWithHarry

Ответить
SANJEEV TUDU
SANJEEV TUDU - 06.12.2020 11:29

Bro you r doing great job

Ответить
Vikas Pal
Vikas Pal - 27.11.2020 11:48

Never Stop Making Such videos

Ответить
Subasish Ghosh
Subasish Ghosh - 28.09.2020 13:20

thanks bhai

Ответить
Sarthak Khare
Sarthak Khare - 24.09.2020 23:54

Well done Sir💯💯💯💯

Ответить
utkarsh ___
utkarsh ___ - 04.09.2020 22:31

Insert per error aa rha h

Ответить
Rahul kamar
Rahul kamar - 04.09.2020 19:27

i am keep waching you,r videos

Ответить
ishtiaq ahmad
ishtiaq ahmad - 07.08.2020 05:01

I like this video. I.A. Siddiqui

Ответить
Rohan Karmakar
Rohan Karmakar - 01.08.2020 21:45

Thank you for the full playlist sir

Ответить
vaibhav kansal
vaibhav kansal - 22.07.2020 08:53

bhai bahot mehnat karte ho

Ответить
Dynamite Gamer
Dynamite Gamer - 20.07.2020 20:20

This guy is amazing

Ответить
Karnail Choudhary
Karnail Choudhary - 20.07.2020 13:25

from tkinter import *

def add():
pass
list_box.insert(ACTIVE, f"{itemvalue.get()} : {pricevalue.get()}")
open_root = Tk()
open_root.title("list box")
open_root.geometry("300x200")
f1 = Frame(open_root)
f1.pack(side=TOP, anchor='n')
item = Label(f1, text="ITEM NAME")
price = Label(f1, text="ITEM PRICE")
item.grid(row=0, column=1)
price.grid(row=1, column=1)
# value
itemvalue = StringVar()
pricevalue = IntVar()
# entry
itemEntry = Entry(f1,textvariable= itemvalue)
priceEntry = Entry(f1,textvariable= pricevalue)
# Entry grid
itemEntry.grid(row=0, column=2)
priceEntry.grid(row=1, column=2)
# button
Button(open_root, text="add items", command=add, bg="green", fg="white").pack(anchor="e")
# list box
list_box = Listbox(open_root)
list_box.pack(side=BOTTOM)
list_box.insert(END)
open_root.mainloop()

Ответить
Rekha Sagar
Rekha Sagar - 02.07.2020 09:13

Sir kya ham list box mein one liner nahi likh saktai

Ответить
anirudh agrawal
anirudh agrawal - 25.06.2020 13:45

khali box yani ghant lol

Ответить
Crypto Knight
Crypto Knight - 15.06.2020 14:02

# Example for python3 listbox

from tkinter import*

def add():
list_1.insert(ACTIVE,entry.get())

root=Tk()
root.geometry("300x400")
root.title("Listbox Example")

list_1=Listbox(root)
list_1.pack()
entry=StringVar()
Entry(root,textvariable=entry).pack()
Button(root,text="add items",command=add).pack()

root.mainloop()

Ответить
MajLiNi
MajLiNi - 13.06.2020 14:38

Nice bhai maja aa gya😀

Ответить
Sameer Kumar
Sameer Kumar - 02.06.2020 20:51

awesome work. keep the work going. Cheers!

Ответить
Aaditya Dabli
Aaditya Dabli - 17.03.2020 09:18

maza aa gaya video me

Ответить
Aniket Kumar
Aniket Kumar - 16.01.2020 20:47

Love You Harry Bhai 🍰 ❤️

Ответить
‎‎‎‎‎‎
‎‎‎‎‎‎ - 12.11.2019 16:34

ಠ_ಠ

Ответить
Sonu chaurasia
Sonu chaurasia - 18.09.2019 13:05

# Add list by submit button 😍😍😍😍😍😍😍😍
from tkinter import *

from tkinter import messagebox



root = Tk()

root.title("List box")

root.geometry("400x400")



lst = Listbox(root)

lst.pack()

def value():

lst.insert(END, f"{str.get()}")

messagebox.showinfo("value inserted", f"{str.get()} is inserted")

lst.insert(END, "python")

lst.insert(END, "java")

lst.insert(END, "javascript")

lst.insert(END, "html")



str = StringVar()



Label(root, text = "Enter your value").pack()

ent = Entry(root, textvariable = str).pack()

btn = Button(root, text = "Submit", command = value).pack()

root.mainloop()

Ответить
Jadeja Virpalsinh
Jadeja Virpalsinh - 10.09.2019 09:08

sir Tq so much for uploading this kind of good video

Ответить
Startwithsatya
Startwithsatya - 28.08.2019 09:42

Ye wala mast hai

Ответить
Wajahat Ali
Wajahat Ali - 23.08.2019 17:05

Fabulous

Ответить
Hafiz Touseef
Hafiz Touseef - 07.08.2019 21:39

Ghanta 😂😂😂😂😂😂😂😂😂

Ответить
S Tripathi
S Tripathi - 18.06.2019 17:06

awesome

Ответить
ameer hamza
ameer hamza - 24.04.2019 13:23

nice video...............................

Ответить
Anand Sahni
Anand Sahni - 09.04.2019 13:09

Thankyou for this video my bro you are the best sir can you make Android game with python please............


Thankyou ones more

Ответить