pack() #creating search entry search = Entry(LeftViewForm, textvariable = SEARCH, font = ( 'verdana', 15 ), width = 10 ) search. pack(side = TOP, padx = 10 ,pady = 5, fill = X) #creating search label and entry in second frame lbl_txtsearch = Label(LeftViewForm, text = "Enter fname to Search", font = ( 'verdana', 10 ),bg = "#0B4670" ) lbl_txtsearch. pack(side = TOP, padx = 10, fill = X) Button(LFrom,text = "Submit" ,font = ( "Arial", 10, "bold" ),command = register,bg = "#15244C" ,fg = "white" ). pack(side = TOP) Entry(LFrom, font = ( "Arial", 10, "bold" ),textvariable = contact). pack(side = TOP) Entry(LFrom, font = ( "Arial", 10, "bold" ),textvariable = address). set( "Select Gender" ) content = OptionMenu(LFrom,gender, * content). pack(side = TOP) #Entry(LFrom, font=("Arial", 10, "bold"),textvariable=gender).pack(side=TOP, padx=10, fill=X) gender. pack(side = TOP) Entry(LFrom, font = ( "Arial", 10, "bold" ),textvariable = lname). pack(side = TOP) Entry(LFrom,font = ( "Arial", 10, "bold" ),textvariable = fname). pack(fill = X) #creating registration form in first left frame Label(LFrom, text = "First Name ", font = ( "Arial", 12 ),bg = "#15244C" ,fg = "white" ). pack(side = RIGHT) #label for heading lbl_text = Label(TopViewForm, text = "Contact Management System", font = ( 'verdana', 18 ), width = 600 ,bg = "cyan" ) lbl_text. pack(side = LEFT, fill = Y) #mid frame for displaying lnames record MidViewForm = Frame(display_screen, width = 600 ) MidViewForm. pack(side = LEFT, fill = Y) #seconf left frame for search form LeftViewForm = Frame(display_screen, width = 500 ,bg = "#0B4670" ) LeftViewForm. pack(side = TOP, fill = X) #first left frame for registration from LFrom = Frame(display_screen, width = "350" ,bg = "#15244C" ) LFrom. title( " presents" ) global tree global SEARCH global fname,lname,gender,address,contact SEARCH = StringVar() fname = StringVar() lname = StringVar() gender = StringVar() address = StringVar() contact = StringVar() #creating frames for layout #topview frame for heading TopViewForm = Frame(display_screen, width = 600, bd = 1, relief = SOLID) TopViewForm. geometry( "900x400" ) #setting title for window display_screen. Print("".#defining function for creating GUI Layout def DisplayForm (): #creating window display_screen = Tk() #setting width and height for window display_screen. Phone_number = input("Phone Number: ") # for convert to int => int(input("Phone Number: ")) Here Complete Source code for the Create a Phone Book Using python project (Copy the code and Run )□□ names =
0 Comments
Leave a Reply. |