Category : tkinter

Email This code error in we are adding one string and one number here we cannot add the string and number Traceback (most recent call last): File “C:/Users/root/Tkineter Project tutorial/venv/ad2.py”, line 5, in <module> print(b+a) TypeError: can only concatenate str (not “int”) to str expl: a = 3 b = “this string ” print(b+a) right ..

Read more

EmailWrapping things inside a Class – Python GUI using Tkinter from tkinter import * class MyButton: def __init__(self,master,text): frame= Frame(master) frame.pack() self.printButton = Button(frame, text=text, command=self.print1) self.printButton.pack() def prinf1(self): print(“this is values”) if __name__ == ‘__main__’: root=Tk() MyButton(root, “My Button1”) MyButton(root, “my Button2”) root…

Read more

EmailCreating a User Prompt in a Tkinter GUI – Python GUI using Tkinter following code using an application to the development of the GUI from tkinter import * import tkinter.messagebox def custom_quit(): answer = tkinter.messagebox.askokcancel(“Are You sure?”,”data will be losse form the coding “) if(answer): print(“exit” ) quit() def work(): print(“this working “) root.geometry(“600×600”) def ..

Read more

EmailCreating a Status Bar in a Tkinter GUI – Python GUI using Tkinter Following coding to use the for Status Bar in python application development from tkinter import * def work(): print(“this working “) root.geometry(“600×600”) def run(): print(“this is run coding”) root.geometry(“200×200”) root = Tk() root.geometry(“600×600″) menu1 = Menu(root) root.config(menu=menu1) submenu = Menu(menu1) menu1.add_cascade(label=”File”,menu=submenu) submenu.add_command(label=”New Project”, ..

Read more

EmailCreating resize window option in a Tkinter GUI – Python GUI using Tkinter Use this coding for the python application creating GUI Following coding using application we can development from tkinter import * def work(): print(“this working “) root.geometry(“600×600”) def run(): print(“this is run coding”) root.geometry(“200×200”) root = Tk() root.geometry(“600×600”) menu1 = Menu(root) root.config(menu=menu1) submenu ..

Read more

EmailCreating Menus and Sub menus in a Tkinter GUI – Python GUI using Tkinter You are following the coding will get the GUI Result. from tkinter import * def work(): print(“this working “) root = Tk() root.geometry(“600×600″) menu1 = Menu(root) root.config(menu=menu1) submenu = Menu(menu1) menu1.add_cascade(label=”File”,menu=submenu) submenu.add_command(label=”New Project”, command=”itworking”) submenu.add_command(label=”Save As”, command=”ntjj”) submenu.add_command(label=”Save”) submenu.add_command(label=”Setting”) submenu.add_command(label=”Exit”) submenu1 ..

Read more

Emailfrom tkinter import * root = Tk() root.geometry(“600×600”) def left(event): print(“this left”) def right(event): print(“this right”) def middle(event): print(“this mideele”) frame = Frame(root, width=350, height=500) frame.bind(“<Button-1>”,left) frame.bind(“<Button-2>”, middle) frame.bind(“<Button-3>”,right) frame.pack() root…

Read more

Emailfrom tkinter import * root = Tk() root.geometry(“600×600″) lable1= Label(root, text=”Email”) lable1.grid(row=0,sticky=’e’) lable1= Label(root, text=”Password”) lable1.grid(row=1) check = Checkbutton(root,text=”Remember me”) button = Button(root,text=”submit”) check.grid(column=1) button.grid(column=0) entry1 = Entry(root) entry2 = Entry(root) entry1.grid(row=0, column=1) entry2.grid(row=1,column=1) root…

Read more

Emailfrom tkinter import * root = Tk() root.geometry(“600×600″) lable1= Label(root, text=”Email”) lable1.grid(row=0,sticky=’e’) lable1= Label(root, text=”Password”) lable1.grid(row=1) entry1 = Entry(root) entry2 = Entry(root) entry1.grid(row=0, column=1) entry2.grid(row=1,column=1) root…

Read more

Emailfrom tkinter import * root = Tk() root.geometry(“346×364″) topfrarme = Frame(root) topfrarme.pack() bframe = Frame() bframe.pack() buttton1 = Button(topfrarme,text=”file”, fg=”blue”) buttton1.pack(side=LEFT) buttton2 = Button() one=Label(root, text=”wleocinjsdjf”, fg=”blue” ,background=’black’) one.pack(side=LEFT, fill=Y) one2 = Label(root, text=”thank eooglo”, bg=”red”) one2.pack(side=BOTTOM, fill=X, padx=10, pady=10) root…

Read more

EmailThe Tkinter module (“Tk interface”) is the standard Python interface to the Tk GUI toolkit. Both Tk and Tkinter are available on most Unix platforms, as well as on Windows systems. (Tk itself is not part of Python; it is maintained at ActiveState.) Running python -m Tkinter from the command line should open a window demonstrating a simple Tk interface, letting you know ..

Read more