Комментарии:
nice
ОтветитьNice video Harry bhai!! Thanks a lot for this one...
Ответить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.
Harry tum kitny phosi ho yaar, mooli walay prathay jesi
ОтветитьPlease make a madical Lab laboratory test report software
ОтветитьSir you are amazing at teaching , please taught some more stuffs and share some of excellent gui made by you.
ОтветитьThank YOu
ОтветитьHello Harry brother
ОтветитьThanku harry bhai
Ответить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"
# === 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
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()
cant imagine which 6 disliked the video
ОтветитьWoooooow
Ответить..😂
Ответить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()
Love you Sir
Ответить❤️
ОтветитьHarry Bhaia maja aa gaya.
ОтветитьLove from Bangladesh 🇧🇩
ОтветитьSir can u plss tell me about f string how where what is the use?
@CodeWithHarry
Bro you r doing great job
ОтветитьNever Stop Making Such videos
Ответитьthanks bhai
ОтветитьWell done Sir💯💯💯💯
ОтветитьInsert per error aa rha h
Ответитьi am keep waching you,r videos
ОтветитьI like this video. I.A. Siddiqui
ОтветитьThank you for the full playlist sir
Ответитьbhai bahot mehnat karte ho
ОтветитьThis guy is amazing
Ответить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()
Sir kya ham list box mein one liner nahi likh saktai
Ответитьkhali box yani ghant lol
Ответить# 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()
Nice bhai maja aa gya😀
Ответитьawesome work. keep the work going. Cheers!
Ответитьmaza aa gaya video me
ОтветитьLove You Harry Bhai 🍰 ❤️
Ответитьಠ_ಠ
Ответить# 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()
sir Tq so much for uploading this kind of good video
ОтветитьYe wala mast hai
ОтветитьFabulous
ОтветитьGhanta 😂😂😂😂😂😂😂😂😂
Ответитьawesome
Ответитьnice video...............................
ОтветитьThankyou for this video my bro you are the best sir can you make Android game with python please............
Thankyou ones more