Best JavaScript code snippet using storybook-root
satellite_singe_window.py
Source:satellite_singe_window.py
...75 self.style = ttk.Style()76 self.data = Database("dental.db")77 if sys.platform == "win32":78 self.style.theme_use('winnative')79 self.style.configure('.', background=_bgcolor)80 self.style.configure('.', foreground=_fgcolor)81 self.style.map('.', background=82 [('selected', _compcolor), ('active', _ana2color)])83 Satellite_Single_Window.geometry("1491x739+35+31")84 Satellite_Single_Window.minsize(148, 1)85 Satellite_Single_Window.maxsize(4112, 1030)86 Satellite_Single_Window.resizable(1, 1)87 Satellite_Single_Window.title("SATELLITE OUT-PATIENT")88 Satellite_Single_Window.configure(background="#40b3a3")89 Satellite_Single_Window.configure(highlightbackground="#d9d9d9")90 Satellite_Single_Window.configure(highlightcolor="black")91 self.menubar = tk.Menu(Satellite_Single_Window, font=font9, bg=_bgcolor, fg=_fgcolor)92 Satellite_Single_Window.configure(menu=self.menubar)93 self.File = tk.Menu(Satellite_Single_Window, tearoff=0)94 self.menubar.add_cascade(menu=self.File,95 activebackground="#ececec",96 activeforeground="#000000",97 background="#d9d9d9",98 font=(99 '-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),100 foreground="#000000",101 label="File")102 self.File.add_command(103 activebackground="#ececec",104 activeforeground="#000000",105 background="#d9d9d9",106 font=('-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),107 foreground="#000000",108 label="Group Entries",109 command= self.satellite)110 self.File.add_command(111 activebackground="#ececec",112 activeforeground="#000000",113 background="#d9d9d9",114 font=('-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),115 foreground="#000000",116 label="Exit",117 command=satelite_window_support.destroy_window)118 self.Department_Label = tk.Label(Satellite_Single_Window)119 self.Department_Label.place(relx=0.241, rely=0.027, relwidth=0.518, relheight=0.084)120 self.Department_Label.configure(activebackground="#f9f9f9")121 self.Department_Label.configure(activeforeground="black")122 self.Department_Label.configure(background="#d9d9d9")123 self.Department_Label.configure(disabledforeground="#a3a3a3")124 self.Department_Label.configure(font="-family {Helvetica} -size 18 -weight normal")125 self.Department_Label.configure(foreground="#000000")126 self.Department_Label.configure(highlightbackground="#d9d9d9")127 self.Department_Label.configure(highlightcolor="black")128 self.Department_Label.configure(relief="raised")129 self.Department_Label.configure(text='''Satellite Centre Out Patient''')130 self.center_radio = tk.IntVar(None, 1)131 # self.center_radio = department_window_support.var132 self.Centre1_Radio = tk.Radiobutton(Satellite_Single_Window)133 self.Centre1_Radio.place(relx=0.013, rely=0.135, relheight=0.042134 , relwidth=0.18)135 self.Centre1_Radio.configure(activebackground="#ececec")136 self.Centre1_Radio.configure(activeforeground="#000000")137 self.Centre1_Radio.configure(background="#d9d9d9")138 self.Centre1_Radio.configure(disabledforeground="#a3a3a3")139 self.Centre1_Radio.configure(font="-family {Helvatica} -size 13 -weight normal")140 self.Centre1_Radio.configure(foreground="#000000")141 self.Centre1_Radio.configure(highlightbackground="#d9d9d9")142 self.Centre1_Radio.configure(highlightcolor="black")143 self.Centre1_Radio.configure(justify='left')144 self.Centre1_Radio.configure(text='''Centre1''')145 self.Centre1_Radio.configure(value=1)146 self.Centre1_Radio.configure(variable=self.center_radio)147 self.Centre2_Radio = tk.Radiobutton(Satellite_Single_Window)148 self.Centre2_Radio.place(relx=0.208, rely=0.135, relheight=0.042149 , relwidth=0.18)150 self.Centre2_Radio.configure(activebackground="#ececec")151 self.Centre2_Radio.configure(activeforeground="#000000")152 self.Centre2_Radio.configure(background="#d9d9d9")153 self.Centre2_Radio.configure(disabledforeground="#a3a3a3")154 self.Centre2_Radio.configure(font="-family {Helvatica} -size 13 -weight normal")155 self.Centre2_Radio.configure(foreground="#000000")156 self.Centre2_Radio.configure(highlightbackground="#d9d9d9")157 self.Centre2_Radio.configure(highlightcolor="black")158 self.Centre2_Radio.configure(justify='left')159 self.Centre2_Radio.configure(text='''Centre2''')160 self.Centre2_Radio.configure(value=2)161 self.Centre2_Radio.configure(variable=self.center_radio)162 self.Centre3_Radio = tk.Radiobutton(Satellite_Single_Window)163 self.Centre3_Radio.place(relx=0.402, rely=0.135, relheight=0.042164 , relwidth=0.18)165 self.Centre3_Radio.configure(activebackground="#ececec",166 activeforeground="#000000",167 background="#d9d9d9",168 disabledforeground="#a3a3a3",169 font="-family {Helvatica} -size 13 -weight normal",170 foreground="#000000",171 highlightbackground="#d9d9d9",172 highlightcolor="black",173 justify='left',174 text='''Centre3''',175 value=3,176 variable=self.center_radio)177 self.Centre4_Radio = tk.Radiobutton(Satellite_Single_Window)178 self.Centre4_Radio.place(relx=0.597, rely=0.135, relheight=0.042179 , relwidth=0.18)180 self.Centre4_Radio.configure(activebackground="#ececec")181 self.Centre4_Radio.configure(activeforeground="#000000")182 self.Centre4_Radio.configure(background="#d9d9d9")183 self.Centre4_Radio.configure(disabledforeground="#a3a3a3")184 self.Centre4_Radio.configure(font="-family {Helvatica} -size 13 -weight normal")185 self.Centre4_Radio.configure(foreground="#000000")186 self.Centre4_Radio.configure(highlightbackground="#d9d9d9")187 self.Centre4_Radio.configure(highlightcolor="black")188 self.Centre4_Radio.configure(justify='left')189 self.Centre4_Radio.configure(text='''Centre4''')190 self.Centre4_Radio.configure(value=4)191 self.Centre4_Radio.configure(variable=self.center_radio)192 self.Incharge_Label = tk.Label(Satellite_Single_Window)193 self.Incharge_Label.place(relx=0.013, rely=0.189, relwidth=0.169, relheight=0.05)194 self.Incharge_Label.configure(activebackground="#f9f9f9")195 self.Incharge_Label.configure(activeforeground="black")196 self.Incharge_Label.configure(background="#d9d9d9")197 self.Incharge_Label.configure(disabledforeground="#a3a3a3")198 self.Incharge_Label.configure(font="-family {Helvetica} -size 13 -weight normal")199 self.Incharge_Label.configure(foreground="#000000")200 self.Incharge_Label.configure(highlightbackground="#d9d9d9")201 self.Incharge_Label.configure(highlightcolor="black")202 self.Incharge_Label.configure(text='''* Incharge''')203 self.Incharge_Entry = tk.Entry(Satellite_Single_Window)204 self.Incharge_Entry.place(relx=0.188, rely=0.189, relheight=0.048205 , relwidth=0.137)206 self.Incharge_Entry.configure(background="white")207 self.Incharge_Entry.configure(disabledforeground="#a3a3a3")208 self.Incharge_Entry.configure(font="-family {Helvetica} -size 10")209 self.Incharge_Entry.configure(foreground="#000000")210 self.Incharge_Entry.configure(highlightbackground="#d9d9d9")211 self.Incharge_Entry.configure(highlightcolor="black")212 self.Incharge_Entry.configure(insertbackground="black")213 self.Incharge_Entry.configure(selectbackground="#c4c4c4")214 self.Incharge_Entry.configure(selectforeground="black")215 self.Phone_Label = tk.Label(Satellite_Single_Window)216 self.Phone_Label.place(relx=0.335, rely=0.189, relwidth=0.162, relheight=0.05)217 self.Phone_Label.configure(activebackground="#f9f9f9")218 self.Phone_Label.configure(activeforeground="black")219 self.Phone_Label.configure(background="#d9d9d9")220 self.Phone_Label.configure(disabledforeground="#a3a3a3")221 self.Phone_Label.configure(font="-family {Helvetica} -size 13 -weight normal")222 self.Phone_Label.configure(foreground="#000000")223 self.Phone_Label.configure(highlightbackground="#d9d9d9")224 self.Phone_Label.configure(highlightcolor="black")225 self.Phone_Label.configure(text='''* Phone''')226 self.Phone_Entry = tk.Entry(Satellite_Single_Window)227 self.Phone_Entry.place(relx=0.51, rely=0.189, relheight=0.048, relwidth=0.137)228 self.Phone_Entry.configure(background="white")229 self.Phone_Entry.configure(disabledforeground="#a3a3a3")230 self.Phone_Entry.configure(font="-family {Helvetica} -size 10")231 self.Phone_Entry.configure(foreground="#000000")232 self.Phone_Entry.configure(highlightbackground="#d9d9d9")233 self.Phone_Entry.configure(highlightcolor="black")234 self.Phone_Entry.configure(insertbackground="black")235 self.Phone_Entry.configure(selectbackground="#c4c4c4")236 self.Phone_Entry.configure(selectforeground="black")237 self.Date_Label = tk.Label(Satellite_Single_Window)238 self.Date_Label.place(relx=0.664, rely=0.189, relwidth=0.122, relheight=0.05)239 self.Date_Label.configure(activebackground="#f9f9f9")240 self.Date_Label.configure(activeforeground="black")241 self.Date_Label.configure(background="#d9d9d9")242 self.Date_Label.configure(disabledforeground="#a3a3a3")243 self.Date_Label.configure(font="-family {Helvetica} -size 13 -weight normal")244 self.Date_Label.configure(foreground="#000000")245 self.Date_Label.configure(highlightbackground="#d9d9d9")246 self.Date_Label.configure(highlightcolor="black")247 self.Date_Label.configure(text='''* Date\nYYYY-MM-DD''')248 now = datetime.datetime.now()249 self.Date_Entry = DateEntry(Satellite_Single_Window, year=now.year, month=now.month, day=now.day)250 self.Date_Entry.place(relx=0.791, rely=0.189, relheight=0.048, relwidth=0.137)251 self.Date_Entry.configure(background="white")252 self.Date_Entry.configure(date_pattern='y-mm-dd')253 self.Date_Entry.configure(font="-family {Helvetica} -size 10")254 self.Date_Entry.configure(foreground="#000000")255 self.Date_Entry.configure(borderwidth=2)256 self.Date_Entry.configure(width=12)257 # self.Date_Entry = tk.Entry(Satellite_Single_Window)258 # self.Date_Entry.place(relx=0.791, rely=0.189, relheight=0.048, relwidth=0.137)259 # self.Date_Entry.configure(background="white")260 # self.Date_Entry.configure(disabledforeground="#a3a3a3")261 # self.Date_Entry.configure(font="-family {Helvetica} -size 10")262 # self.Date_Entry.configure(foreground="#000000")263 # self.Date_Entry.configure(highlightbackground="#d9d9d9")264 # self.Date_Entry.configure(highlightcolor="black")265 # self.Date_Entry.configure(insertbackground="black")266 # self.Date_Entry.configure(selectbackground="#c4c4c4")267 # self.Date_Entry.configure(selectforeground="black")268 self.ID_Label = tk.Label(Satellite_Single_Window)269 self.ID_Label.place(relx=0.013, rely=0.311, relwidth=0.102, relheight=0.05)270 self.ID_Label.configure(activebackground="#f9f9f9")271 self.ID_Label.configure(activeforeground="black")272 self.ID_Label.configure(background="#d9d9d9")273 self.ID_Label.configure(disabledforeground="#a3a3a3")274 self.ID_Label.configure(font="-family {Helvetica} -size 13 -weight normal")275 self.ID_Label.configure(foreground="#000000")276 self.ID_Label.configure(highlightbackground="#d9d9d9")277 self.ID_Label.configure(highlightcolor="black")278 self.ID_Label.configure(text='''* ID ''')279 self.ID_Entry = tk.Entry(Satellite_Single_Window)280 self.ID_Entry.place(relx=0.12, rely=0.311, relwidth=0.102, relheight=0.048)281 self.ID_Entry.configure(background="white")282 self.ID_Entry.configure(disabledforeground="#a3a3a3")283 self.ID_Entry.configure(font="-family {Helvetica} -size 10")284 self.ID_Entry.configure(foreground="#000000")285 self.ID_Entry.configure(highlightbackground="#d9d9d9")286 self.ID_Entry.configure(highlightcolor="black")287 self.ID_Entry.configure(insertbackground="black")288 self.ID_Entry.configure(selectbackground="#c4c4c4")289 self.ID_Entry.configure(selectforeground="black")290 self.Patient_Name_Label = tk.Label(Satellite_Single_Window)291 self.Patient_Name_Label.place(relx=0.23, rely=0.311, relwidth=0.102, relheight=0.05)292 self.Patient_Name_Label.configure(activebackground="#f9f9f9")293 self.Patient_Name_Label.configure(activeforeground="black")294 self.Patient_Name_Label.configure(background="#d9d9d9")295 self.Patient_Name_Label.configure(disabledforeground="#a3a3a3")296 self.Patient_Name_Label.configure(font="-family {Helvetica} -size 13 -weight normal")297 self.Patient_Name_Label.configure(foreground="#000000")298 self.Patient_Name_Label.configure(highlightbackground="#d9d9d9")299 self.Patient_Name_Label.configure(highlightcolor="black")300 self.Patient_Name_Label.configure(text='''* Patient Name''')301 self.Patient_Name_Entry = tk.Entry(Satellite_Single_Window)302 self.Patient_Name_Entry.place(relx=0.342, rely=0.311, relwidth=0.102, relheight=0.048)303 self.Patient_Name_Entry.configure(background="white")304 self.Patient_Name_Entry.configure(disabledforeground="#a3a3a3")305 self.Patient_Name_Entry.configure(font="-family {Helvetica} -size 10")306 self.Patient_Name_Entry.configure(foreground="#000000")307 self.Patient_Name_Entry.configure(highlightbackground="#d9d9d9")308 self.Patient_Name_Entry.configure(highlightcolor="black")309 self.Patient_Name_Entry.configure(insertbackground="black")310 self.Patient_Name_Entry.configure(selectbackground="#c4c4c4")311 self.Patient_Name_Entry.configure(selectforeground="black")312 self.Patient_Phone_Label = tk.Label(Satellite_Single_Window)313 self.Patient_Phone_Label.place(relx=0.45, rely=0.311, relwidth=0.102, relheight=0.05)314 self.Patient_Phone_Label.configure(activebackground="#f9f9f9")315 self.Patient_Phone_Label.configure(activeforeground="black")316 self.Patient_Phone_Label.configure(background="#d9d9d9")317 self.Patient_Phone_Label.configure(disabledforeground="#a3a3a3")318 self.Patient_Phone_Label.configure(font="-family {Helvetica} -size 13 -weight normal")319 self.Patient_Phone_Label.configure(foreground="#000000")320 self.Patient_Phone_Label.configure(highlightbackground="#d9d9d9")321 self.Patient_Phone_Label.configure(highlightcolor="black")322 self.Patient_Phone_Label.configure(text='''Patient Phone NO''')323 self.Patient_Phone_Entry = tk.Entry(Satellite_Single_Window)324 self.Patient_Phone_Entry.place(relx=0.56, rely=0.311, relwidth=0.089, relheight=0.048)325 self.Patient_Phone_Entry.configure(background="white")326 self.Patient_Phone_Entry.configure(disabledforeground="#a3a3a3")327 self.Patient_Phone_Entry.configure(font="-family {Helvetica} -size 10")328 self.Patient_Phone_Entry.configure(foreground="#000000")329 self.Patient_Phone_Entry.configure(highlightbackground="#d9d9d9")330 self.Patient_Phone_Entry.configure(highlightcolor="black")331 self.Patient_Phone_Entry.configure(insertbackground="black")332 self.Patient_Phone_Entry.configure(selectbackground="#c4c4c4")333 self.Patient_Phone_Entry.configure(selectforeground="black")334 self.Endodontics_Check = tk.Checkbutton(Satellite_Single_Window)335 self.Endodontics_Check.place(relx=0.013, rely=0.379, relwidth=0.162, relheight=0.05)336 self.Endodontics_Check.configure(activebackground="#ececec")337 self.Endodontics_Check.configure(activeforeground="#000000")338 self.Endodontics_Check.configure(background="#d9d9d9")339 self.Endodontics_Check.configure(disabledforeground="#a3a3a3")340 self.Endodontics_Check.configure(font="-family {Helvetica} -size 13 -weight normal")341 self.Endodontics_Check.configure(foreground="#000000")342 self.Endodontics_Check.configure(highlightbackground="#d9d9d9")343 self.Endodontics_Check.configure(highlightcolor="black")344 self.Endodontics_Check.configure(justify='left')345 self.Endodontics_Check.configure(text='''Endodontics ''')346 self.Endodontics_Check.configure(variable=satellite_singe_window_support.Endodontics)347 self.Periodont_Check = tk.Checkbutton(Satellite_Single_Window)348 self.Periodont_Check.place(relx=0.013, rely=0.447, relwidth=0.162, relheight=0.05)349 self.Periodont_Check.configure(activebackground="#ececec")350 self.Periodont_Check.configure(activeforeground="#000000")351 self.Periodont_Check.configure(background="#d9d9d9")352 self.Periodont_Check.configure(disabledforeground="#a3a3a3")353 self.Periodont_Check.configure(font="-family {Helvetica} -size 13 -weight normal")354 self.Periodont_Check.configure(foreground="#000000")355 self.Periodont_Check.configure(highlightbackground="#d9d9d9")356 self.Periodont_Check.configure(highlightcolor="black")357 self.Periodont_Check.configure(justify='left')358 self.Periodont_Check.configure(text='''Periodontics ''')359 self.Periodont_Check.configure(variable=satellite_singe_window_support.Periodont)360 self.Orthodontics_Check = tk.Checkbutton(Satellite_Single_Window)361 self.Orthodontics_Check.place(relx=0.013, rely=0.514, relwidth=0.162, relheight=0.05)362 self.Orthodontics_Check.configure(activebackground="#ececec")363 self.Orthodontics_Check.configure(activeforeground="#000000")364 self.Orthodontics_Check.configure(background="#d9d9d9")365 self.Orthodontics_Check.configure(disabledforeground="#a3a3a3")366 self.Orthodontics_Check.configure(font="-family {Helvetica} -size 13 -weight normal")367 self.Orthodontics_Check.configure(foreground="#000000")368 self.Orthodontics_Check.configure(highlightbackground="#d9d9d9")369 self.Orthodontics_Check.configure(highlightcolor="black")370 self.Orthodontics_Check.configure(justify='left')371 self.Orthodontics_Check.configure(text='''Orthodontics''')372 self.Orthodontics_Check.configure(variable=satellite_singe_window_support.Orthodontics)373 self.Surgery_Check = tk.Checkbutton(Satellite_Single_Window)374 self.Surgery_Check.place(relx=0.013, rely=0.582, relwidth=0.162, relheight=0.05)375 self.Surgery_Check.configure(activebackground="#ececec")376 self.Surgery_Check.configure(activeforeground="#000000")377 self.Surgery_Check.configure(background="#d9d9d9")378 self.Surgery_Check.configure(disabledforeground="#a3a3a3")379 self.Surgery_Check.configure(font="-family {Helvetica} -size 13 -weight normal")380 self.Surgery_Check.configure(foreground="#000000")381 self.Surgery_Check.configure(highlightbackground="#d9d9d9")382 self.Surgery_Check.configure(highlightcolor="black")383 self.Surgery_Check.configure(justify='left')384 self.Surgery_Check.configure(text='''Oral Surgery ''')385 self.Surgery_Check.configure(variable=satellite_singe_window_support.Surgery)386 self.Pedodont_Check = tk.Checkbutton(Satellite_Single_Window)387 self.Pedodont_Check.place(relx=0.013, rely=0.65, relwidth=0.162, relheight=0.05)388 self.Pedodont_Check.configure(activebackground="#ececec")389 self.Pedodont_Check.configure(activeforeground="#000000")390 self.Pedodont_Check.configure(background="#d9d9d9")391 self.Pedodont_Check.configure(disabledforeground="#a3a3a3")392 self.Pedodont_Check.configure(font="-family {Helvetica} -size 13 -weight normal")393 self.Pedodont_Check.configure(foreground="#000000")394 self.Pedodont_Check.configure(highlightbackground="#d9d9d9")395 self.Pedodont_Check.configure(highlightcolor="black")396 self.Pedodont_Check.configure(justify='left')397 self.Pedodont_Check.configure(text='''Pedodontics ''')398 self.Pedodont_Check.configure(variable=satellite_singe_window_support.Pedodont)399 self.Oralpatho_Check = tk.Checkbutton(Satellite_Single_Window)400 self.Oralpatho_Check.place(relx=0.335, rely=0.379, relwidth=0.162, relheight=0.05)401 self.Oralpatho_Check.configure(activebackground="#ececec")402 self.Oralpatho_Check.configure(activeforeground="#000000")403 self.Oralpatho_Check.configure(background="#d9d9d9")404 self.Oralpatho_Check.configure(disabledforeground="#a3a3a3")405 self.Oralpatho_Check.configure(font="-family {Helvetica} -size 13 -weight normal")406 self.Oralpatho_Check.configure(foreground="#000000")407 self.Oralpatho_Check.configure(highlightbackground="#d9d9d9")408 self.Oralpatho_Check.configure(highlightcolor="black")409 self.Oralpatho_Check.configure(justify='left')410 self.Oralpatho_Check.configure(text='''Oral Pathology ''')411 self.Oralpatho_Check.configure(variable=satellite_singe_window_support.Oralpatho)412 self.Public_Health_Check = tk.Checkbutton(Satellite_Single_Window)413 self.Public_Health_Check.place(relx=0.335, rely=0.447, relwidth=0.162, relheight=0.05)414 self.Public_Health_Check.configure(activebackground="#ececec")415 self.Public_Health_Check.configure(activeforeground="#000000")416 self.Public_Health_Check.configure(background="#d9d9d9")417 self.Public_Health_Check.configure(disabledforeground="#a3a3a3")418 self.Public_Health_Check.configure(font="-family {Helvetica} -size 13 -weight normal")419 self.Public_Health_Check.configure(foreground="#000000")420 self.Public_Health_Check.configure(highlightbackground="#d9d9d9")421 self.Public_Health_Check.configure(highlightcolor="black")422 self.Public_Health_Check.configure(justify='left')423 self.Public_Health_Check.configure(text='''Public Health ''')424 self.Public_Health_Check.configure(variable=satellite_singe_window_support.Public_Health)425 self.Oral_Mea_Check = tk.Checkbutton(Satellite_Single_Window)426 self.Oral_Mea_Check.place(relx=0.335, rely=0.514, relwidth=0.162, relheight=0.05)427 self.Oral_Mea_Check.configure(activebackground="#ececec")428 self.Oral_Mea_Check.configure(activeforeground="#000000")429 self.Oral_Mea_Check.configure(background="#d9d9d9")430 self.Oral_Mea_Check.configure(disabledforeground="#a3a3a3")431 self.Oral_Mea_Check.configure(font="-family {Helvetica} -size 13 -weight normal")432 self.Oral_Mea_Check.configure(foreground="#000000")433 self.Oral_Mea_Check.configure(highlightbackground="#d9d9d9")434 self.Oral_Mea_Check.configure(highlightcolor="black")435 self.Oral_Mea_Check.configure(justify='left')436 self.Oral_Mea_Check.configure(text='''Oral Medicine ''')437 self.Oral_Mea_Check.configure(variable=satellite_singe_window_support.Oral_Mea)438 self.Prostho_Check = tk.Checkbutton(Satellite_Single_Window)439 self.Prostho_Check.place(relx=0.335, rely=0.582, relwidth=0.162, relheight=0.05)440 self.Prostho_Check.configure(activebackground="#ececec")441 self.Prostho_Check.configure(activeforeground="#000000")442 self.Prostho_Check.configure(background="#d9d9d9")443 self.Prostho_Check.configure(disabledforeground="#a3a3a3")444 self.Prostho_Check.configure(font="-family {Helvetica} -size 13 -weight normal")445 self.Prostho_Check.configure(foreground="#000000")446 self.Prostho_Check.configure(highlightbackground="#d9d9d9")447 self.Prostho_Check.configure(highlightcolor="black")448 self.Prostho_Check.configure(justify='left')449 self.Prostho_Check.configure(text='''Prosthodontics''')450 self.Prostho_Check.configure(variable=satellite_singe_window_support.Prostho)451 self.Grand_Total_Label = tk.Label(Satellite_Single_Window)452 self.Grand_Total_Label.place(relx=0.335, rely=0.65, relwidth=0.162, relheight=0.05)453 self.Grand_Total_Label.configure(activebackground="#f9f9f9")454 self.Grand_Total_Label.configure(activeforeground="black")455 self.Grand_Total_Label.configure(background="#d9d9d9")456 self.Grand_Total_Label.configure(disabledforeground="#a3a3a3")457 self.Grand_Total_Label.configure(font="-family {Helvetica} -size 13 -weight normal")458 self.Grand_Total_Label.configure(foreground="#000000")459 self.Grand_Total_Label.configure(highlightbackground="#d9d9d9")460 self.Grand_Total_Label.configure(highlightcolor="black")461 self.Grand_Total_Label.configure(text='''Grand Total''')462 # Defining the entries463 self.Endodontics_Label = tk.Label(Satellite_Single_Window)464 self.Endodontics_Label.place(relx=0.188, rely=0.379, relwidth=0.137, relheight=0.048)465 self.Endodontics_Label.configure(background="#40b3a3")466 self.Endodontics_Label.configure(disabledforeground="#a3a3a3")467 self.Endodontics_Label.configure(font="-family {Helvetica} -size 10")468 self.Endodontics_Label.configure(foreground="#000000")469 self.Endodontics_Label.configure(highlightbackground="#d9d9d9")470 self.Endodontics_Label.configure(highlightcolor="black")471 self.Endodontics_Label.configure(relief="groove")472 self.Periodont_Label = tk.Label(Satellite_Single_Window)473 self.Periodont_Label.place(relx=0.188, rely=0.447, relwidth=0.137, relheight=0.048)474 self.Periodont_Label.configure(background="#40b3a3")475 self.Periodont_Label.configure(disabledforeground="#a3a3a3")476 self.Periodont_Label.configure(font="-family {Helvetica} -size 10")477 self.Periodont_Label.configure(foreground="#000000")478 self.Periodont_Label.configure(highlightbackground="#d9d9d9")479 self.Periodont_Label.configure(highlightcolor="black")480 self.Periodont_Label.configure(relief="groove")481 self.Orthodontics_Label = tk.Label(Satellite_Single_Window)482 self.Orthodontics_Label.place(relx=0.188, rely=0.514, relwidth=0.137, relheight=0.048)483 self.Orthodontics_Label.configure(background="#40b3a3")484 self.Orthodontics_Label.configure(disabledforeground="#a3a3a3")485 self.Orthodontics_Label.configure(font="-family {Helvetica} -size 10")486 self.Orthodontics_Label.configure(foreground="#000000")487 self.Orthodontics_Label.configure(highlightbackground="#d9d9d9")488 self.Orthodontics_Label.configure(highlightcolor="black")489 self.Orthodontics_Label.configure(relief="groove")490 self.Surgery_Label = tk.Label(Satellite_Single_Window)491 self.Surgery_Label.place(relx=0.188, rely=0.582, relwidth=0.137, relheight=0.048)492 self.Surgery_Label.configure(background="#40b3a3")493 self.Surgery_Label.configure(disabledforeground="#a3a3a3")494 self.Surgery_Label.configure(font="-family {Helvetica} -size 10")495 self.Surgery_Label.configure(foreground="#000000")496 self.Surgery_Label.configure(highlightbackground="#d9d9d9")497 self.Surgery_Label.configure(highlightcolor="black")498 self.Surgery_Label.configure(relief="groove")499 self.Pedodont_Label = tk.Label(Satellite_Single_Window)500 self.Pedodont_Label.place(relx=0.188, rely=0.65, relwidth=0.137, relheight=0.048)501 self.Pedodont_Label.configure(background="#40b3a3")502 self.Pedodont_Label.configure(disabledforeground="#a3a3a3")503 self.Pedodont_Label.configure(font="-family {Helvetica} -size 10")504 self.Pedodont_Label.configure(foreground="#000000")505 self.Pedodont_Label.configure(highlightbackground="#d9d9d9")506 self.Pedodont_Label.configure(highlightcolor="black")507 self.Pedodont_Label.configure(relief="groove")508 self.Oralpatho_Label = tk.Label(Satellite_Single_Window)509 self.Oralpatho_Label.place(relx=0.51, rely=0.379, relwidth=0.137, relheight=0.048)510 self.Oralpatho_Label.configure(background="#40b3a3")511 self.Oralpatho_Label.configure(disabledforeground="#a3a3a3")512 self.Oralpatho_Label.configure(font="-family {Helvetica} -size 10")513 self.Oralpatho_Label.configure(foreground="#000000")514 self.Oralpatho_Label.configure(highlightbackground="#d9d9d9")515 self.Oralpatho_Label.configure(highlightcolor="black")516 self.Oralpatho_Label.configure(relief="groove")517 self.Public_Health_Label = tk.Label(Satellite_Single_Window)518 self.Public_Health_Label.place(relx=0.51, rely=0.447, relwidth=0.137, relheight=0.048)519 self.Public_Health_Label.configure(background="#40b3a3")520 self.Public_Health_Label.configure(disabledforeground="#a3a3a3")521 self.Public_Health_Label.configure(font="-family {Helvetica} -size 10")522 self.Public_Health_Label.configure(foreground="#000000")523 self.Public_Health_Label.configure(highlightbackground="#d9d9d9")524 self.Public_Health_Label.configure(highlightcolor="black")525 self.Public_Health_Label.configure(relief="groove")526 self.Oral_Mea_Label = tk.Label(Satellite_Single_Window)527 self.Oral_Mea_Label.place(relx=0.51, rely=0.514, relwidth=0.137, relheight=0.048)528 self.Oral_Mea_Label.configure(background="#40b3a3")529 self.Oral_Mea_Label.configure(disabledforeground="#a3a3a3")530 self.Oral_Mea_Label.configure(font="-family {Helvetica} -size 10")531 self.Oral_Mea_Label.configure(foreground="#000000")532 self.Oral_Mea_Label.configure(highlightbackground="#d9d9d9")533 self.Oral_Mea_Label.configure(highlightcolor="black")534 self.Oral_Mea_Label.configure(relief="groove")535 self.Prostho_Label = tk.Label(Satellite_Single_Window)536 self.Prostho_Label.place(relx=0.51, rely=0.582, relwidth=0.137, relheight=0.048)537 self.Prostho_Label.configure(background="#40b3a3")538 self.Prostho_Label.configure(disabledforeground="#a3a3a3")539 self.Prostho_Label.configure(font="-family {Helvetica} -size 10")540 self.Prostho_Label.configure(foreground="#000000")541 self.Prostho_Label.configure(highlightbackground="#d9d9d9")542 self.Prostho_Label.configure(highlightcolor="black")543 self.Prostho_Label.configure(relief="groove")544 self.Grand_Total_Label = tk.Label(Satellite_Single_Window)545 self.Grand_Total_Label.place(relx=0.51, rely=0.65, relwidth=0.137, relheight=0.048)546 self.Grand_Total_Label.configure(background="#40b3a3")547 self.Grand_Total_Label.configure(disabledforeground="#a3a3a3")548 self.Grand_Total_Label.configure(font="-family {Helvetica} -size 10")549 self.Grand_Total_Label.configure(foreground="#000000")550 self.Grand_Total_Label.configure(highlightbackground="#d9d9d9")551 self.Grand_Total_Label.configure(highlightcolor="black")552 self.Grand_Total_Label.configure(relief="groove")553 self.Add_Button_ = tk.Button(Satellite_Single_Window)554 self.Add_Button_.place(relx=0.798, rely=0.311, relwidth=0.078, relheight=0.06)555 self.Add_Button_.configure(activebackground="#ececec")556 self.Add_Button_.configure(activeforeground="#000000")557 self.Add_Button_.configure(background="#d9d9d9")558 self.Add_Button_.configure(disabledforeground="#a3a3a3")559 self.Add_Button_.configure(font="-family {Helvetica} -size 13 -weight normal")560 self.Add_Button_.configure(foreground="#000000")561 self.Add_Button_.configure(highlightbackground="#d9d9d9")562 self.Add_Button_.configure(highlightcolor="black")563 self.Add_Button_.configure(pady="0")564 self.Add_Button_.configure(text='''ADD''', command=self.add_item)565 self.Delete_Button = tk.Button(Satellite_Single_Window)566 self.Delete_Button.place(relx=0.798, rely=0.392, relwidth=0.078, relheight=0.06)567 self.Delete_Button.configure(activebackground="#ececec")568 self.Delete_Button.configure(activeforeground="#000000")569 self.Delete_Button.configure(background="#d9d9d9")570 self.Delete_Button.configure(disabledforeground="#a3a3a3")571 self.Delete_Button.configure(font="-family {Helvetica} -size 13 -weight normal")572 self.Delete_Button.configure(foreground="#000000")573 self.Delete_Button.configure(highlightbackground="#d9d9d9")574 self.Delete_Button.configure(highlightcolor="black")575 self.Delete_Button.configure(pady="0")576 self.Delete_Button.configure(text='''DELETE''', command=self.remove_item)577 self.Update_Button = tk.Button(Satellite_Single_Window)578 self.Update_Button.place(relx=0.798, rely=0.474, relwidth=0.078, relheight=0.06)579 self.Update_Button.configure(activebackground="#ececec")580 self.Update_Button.configure(activeforeground="#000000")581 self.Update_Button.configure(background="#d9d9d9")582 self.Update_Button.configure(disabledforeground="#a3a3a3")583 self.Update_Button.configure(font="-family {Helvetica} -size 13 -weight normal")584 self.Update_Button.configure(foreground="#000000")585 self.Update_Button.configure(highlightbackground="#d9d9d9")586 self.Update_Button.configure(highlightcolor="black")587 self.Update_Button.configure(pady="0")588 self.Update_Button.configure(text='''UPDATE''', command=self.update_item)589 self.Clear_Button = tk.Button(Satellite_Single_Window)590 self.Clear_Button.place(relx=0.798, rely=0.555, relwidth=0.078, relheight=0.06)591 self.Clear_Button.configure(activebackground="#ececec")592 self.Clear_Button.configure(activeforeground="#000000")593 self.Clear_Button.configure(background="#d9d9d9")594 self.Clear_Button.configure(disabledforeground="#a3a3a3")595 self.Clear_Button.configure(font="-family {Helvetica} -size 13 -weight normal")596 self.Clear_Button.configure(foreground="#000000")597 self.Clear_Button.configure(highlightbackground="#d9d9d9")598 self.Clear_Button.configure(highlightcolor="black")599 self.Clear_Button.configure(pady="0")600 self.Clear_Button.configure(text='''CLEAR''', command=self.clear_text)601 self.Refresh_Button = tk.Button(Satellite_Single_Window)602 self.Refresh_Button.place(relx=0.798, rely=0.63, relwidth=0.078, relheight=0.06)603 self.Refresh_Button.configure(activebackground="#ececec")604 self.Refresh_Button.configure(activeforeground="#000000")605 self.Refresh_Button.configure(background="#d9d9d9")606 self.Refresh_Button.configure(disabledforeground="#a3a3a3")607 self.Refresh_Button.configure(font="-family {Helvetica} -size 13 -weight normal")608 self.Refresh_Button.configure(foreground="#000000")609 self.Refresh_Button.configure(highlightbackground="#d9d9d9")610 self.Refresh_Button.configure(highlightcolor="black")611 self.Refresh_Button.configure(pady="0")612 self.Refresh_Button.configure(text='''REFRESH''', command=self.populate_list)613 self.Scrolledtreeview1 = ScrolledTreeView(Satellite_Single_Window)614 self.Scrolledtreeview1.place(relx=0.02, rely=0.717, relheight=0.253615 , relwidth=0.969)616 self.Scrolledtreeview1.configure(columns=(617 "Id", "Date", "T/R/S", "Place", "Incharge", "Phone_no", "Patient_name", "Patient_contact",618 "Endodontics", "Periodont", "Orthodontics", "Surgery", "Pedodont", "Oral_Patho",619 "Public_Health", "Oral_Mea", "Prostho", "Total"))620 # self.Scrolledtreeview1.configure(columns="Col2")621 # self.Scrolledtreeview1.configure(columns="Col3")622 # build_treeview_support starting.623 self.Scrolledtreeview1.heading("#0", text="S.NO")624 self.Scrolledtreeview1.heading("#0", anchor="center")625 self.Scrolledtreeview1.column("#0", width="50")626 self.Scrolledtreeview1.column("#0", minwidth="20")627 self.Scrolledtreeview1.column("#0", stretch="1")628 self.Scrolledtreeview1.column("#0", anchor="center")629 self.Scrolledtreeview1.heading("Id", text="ID")630 self.Scrolledtreeview1.heading("Id", anchor="center")631 self.Scrolledtreeview1.column("Id", width="100")632 self.Scrolledtreeview1.column("Id", minwidth="20")633 self.Scrolledtreeview1.column("Id", stretch="1")634 self.Scrolledtreeview1.column("Id", anchor="center")635 self.Scrolledtreeview1.heading("Date", text="Date")636 self.Scrolledtreeview1.heading("Date", anchor="center")637 self.Scrolledtreeview1.column("Date", width="100")638 self.Scrolledtreeview1.column("Date", minwidth="20")639 self.Scrolledtreeview1.column("Date", stretch="1")640 self.Scrolledtreeview1.column("Date", anchor="w")641 self.Scrolledtreeview1.heading("T/R/S", text="T/R/S")642 self.Scrolledtreeview1.heading("T/R/S", anchor="center")643 self.Scrolledtreeview1.column("T/R/S", width="100")644 self.Scrolledtreeview1.column("T/R/S", minwidth="20")645 self.Scrolledtreeview1.column("T/R/S", stretch="1")646 self.Scrolledtreeview1.column("T/R/S", anchor="center")647 self.Scrolledtreeview1.heading("Place", text="Place")648 self.Scrolledtreeview1.heading("Place", anchor="center")649 self.Scrolledtreeview1.column("Place", width="100")650 self.Scrolledtreeview1.column("Place", minwidth="20")651 self.Scrolledtreeview1.column("Place", stretch="1")652 self.Scrolledtreeview1.column("Place", anchor="center")653 self.Scrolledtreeview1.heading("Incharge", text="Incharge")654 self.Scrolledtreeview1.heading("Incharge", anchor="center")655 self.Scrolledtreeview1.column("Incharge", width="100")656 self.Scrolledtreeview1.column("Incharge", minwidth="20")657 self.Scrolledtreeview1.column("Incharge", stretch="1")658 self.Scrolledtreeview1.column("Incharge", anchor="center")659 self.Scrolledtreeview1.heading("Phone_no", text="Phone no")660 self.Scrolledtreeview1.heading("Phone_no", anchor="center")661 self.Scrolledtreeview1.column("Phone_no", width="100")662 self.Scrolledtreeview1.column("Phone_no", minwidth="20")663 self.Scrolledtreeview1.column("Phone_no", stretch="1")664 self.Scrolledtreeview1.column("Phone_no", anchor="center")665 self.Scrolledtreeview1.heading("Patient_name", text="Patient Name")666 self.Scrolledtreeview1.heading("Patient_name", anchor="center")667 self.Scrolledtreeview1.column("Patient_name", width="100")668 self.Scrolledtreeview1.column("Patient_name", minwidth="20")669 self.Scrolledtreeview1.column("Patient_name", stretch="1")670 self.Scrolledtreeview1.column("Patient_name", anchor="center")671 self.Scrolledtreeview1.heading("Patient_contact", text="Patient Contact")672 self.Scrolledtreeview1.heading("Patient_contact", anchor="center")673 self.Scrolledtreeview1.column("Patient_contact", width="100")674 self.Scrolledtreeview1.column("Patient_contact", minwidth="20")675 self.Scrolledtreeview1.column("Patient_contact", stretch="1")676 self.Scrolledtreeview1.column("Patient_contact", anchor="center")677 self.Scrolledtreeview1.heading("Endodontics", text="Endodontics")678 self.Scrolledtreeview1.heading("Endodontics", anchor="center")679 self.Scrolledtreeview1.column("Endodontics", width="100")680 self.Scrolledtreeview1.column("Endodontics", minwidth="20")681 self.Scrolledtreeview1.column("Endodontics", stretch="1")682 self.Scrolledtreeview1.column("Endodontics", anchor="center")683 self.Scrolledtreeview1.heading("Periodont", text="Periodont")684 self.Scrolledtreeview1.heading("Periodont", anchor="center")685 self.Scrolledtreeview1.column("Periodont", width="100")686 self.Scrolledtreeview1.column("Periodont", minwidth="20")687 self.Scrolledtreeview1.column("Periodont", stretch="1")688 self.Scrolledtreeview1.column("Periodont", anchor="center")689 self.Scrolledtreeview1.heading("Orthodontics", text="Orthodontics")690 self.Scrolledtreeview1.heading("Orthodontics", anchor="center")691 self.Scrolledtreeview1.column("Orthodontics", width="100")692 self.Scrolledtreeview1.column("Orthodontics", minwidth="20")693 self.Scrolledtreeview1.column("Orthodontics", stretch="1")694 self.Scrolledtreeview1.column("Orthodontics", anchor="center")695 self.Scrolledtreeview1.heading("Surgery", text="Surgery")696 self.Scrolledtreeview1.heading("Surgery", anchor="center")697 self.Scrolledtreeview1.column("Surgery", width="100")698 self.Scrolledtreeview1.column("Surgery", minwidth="20")699 self.Scrolledtreeview1.column("Surgery", stretch="1")700 self.Scrolledtreeview1.column("Surgery", anchor="center")701 self.Scrolledtreeview1.heading("Pedodont", text="Pedodont")702 self.Scrolledtreeview1.heading("Pedodont", anchor="center")703 self.Scrolledtreeview1.column("Pedodont", width="100")704 self.Scrolledtreeview1.column("Pedodont", minwidth="20")705 self.Scrolledtreeview1.column("Pedodont", stretch="1")706 self.Scrolledtreeview1.column("Pedodont", anchor="center")707 self.Scrolledtreeview1.heading("Oral_Patho", text="Oral Patho")708 self.Scrolledtreeview1.heading("Oral_Patho", anchor="center")709 self.Scrolledtreeview1.column("Oral_Patho", width="100")710 self.Scrolledtreeview1.column("Oral_Patho", minwidth="20")711 self.Scrolledtreeview1.column("Oral_Patho", stretch="1")712 self.Scrolledtreeview1.column("Oral_Patho", anchor="center")713 self.Scrolledtreeview1.heading("Public_Health", text="Public Health")714 self.Scrolledtreeview1.heading("Public_Health", anchor="center")715 self.Scrolledtreeview1.column("Public_Health", width="100")716 self.Scrolledtreeview1.column("Public_Health", minwidth="20")717 self.Scrolledtreeview1.column("Public_Health", stretch="1")718 self.Scrolledtreeview1.column("Public_Health", anchor="center")719 self.Scrolledtreeview1.heading("Oral_Mea", text="Oral Mea")720 self.Scrolledtreeview1.heading("Oral_Mea", anchor="center")721 self.Scrolledtreeview1.column("Oral_Mea", width="100")722 self.Scrolledtreeview1.column("Oral_Mea", minwidth="20")723 self.Scrolledtreeview1.column("Oral_Mea", stretch="1")724 self.Scrolledtreeview1.column("Oral_Mea", anchor="center")725 self.Scrolledtreeview1.heading("Prostho", text="Prostho")726 self.Scrolledtreeview1.heading("Prostho", anchor="center")727 self.Scrolledtreeview1.column("Prostho", width="100")728 self.Scrolledtreeview1.column("Prostho", minwidth="20")729 self.Scrolledtreeview1.column("Prostho", stretch="1")730 self.Scrolledtreeview1.column("Prostho", anchor="center")731 self.Scrolledtreeview1.heading("Total", text="Total")732 self.Scrolledtreeview1.heading("Total", anchor="center")733 self.Scrolledtreeview1.column("Total", width="100")734 self.Scrolledtreeview1.column("Total", minwidth="20")735 self.Scrolledtreeview1.column("Total", stretch="1")736 self.Scrolledtreeview1.column("Total", anchor="center")737 # self.Scrolledlistbox3 = ScrolledListBox(Satellite_Single_Window)738 # self.Scrolledlistbox3.place(relx=0.02, rely=0.717, relheight=0.253739 # , relwidth=0.969)740 # self.Scrolledlistbox3.configure(background="white")741 # self.Scrolledlistbox3.configure(disabledforeground="#a3a3a3")742 # self.Scrolledlistbox3.configure(font=font10)743 # self.Scrolledlistbox3.configure(foreground="black")744 # self.Scrolledlistbox3.configure(highlightbackground="#d9d9d9")745 # self.Scrolledlistbox3.configure(highlightcolor="#d9d9d9")746 # self.Scrolledlistbox3.configure(selectbackground="#c4c4c4")747 # self.Scrolledlistbox3.configure(selectforeground="black")748 self.tr_radio = tk.IntVar(None, 1)749 self.Screened_Radio = tk.Radiobutton(Satellite_Single_Window)750 self.Screened_Radio.place(relx=0.013, rely=0.257, relheight=0.042, relwidth=0.10)751 self.Screened_Radio.configure(activebackground="#ececec")752 self.Screened_Radio.configure(activeforeground="#000000")753 self.Screened_Radio.configure(background="#d9d9d9")754 self.Screened_Radio.configure(disabledforeground="#a3a3a3")755 self.Screened_Radio.configure(font=font11)756 self.Screened_Radio.configure(foreground="#000000")757 self.Screened_Radio.configure(highlightbackground="#d9d9d9")758 self.Screened_Radio.configure(highlightcolor="black")759 self.Screened_Radio.configure(justify='left')760 self.Screened_Radio.configure(text='''Screened''')761 self.Screened_Radio.configure(value=1)762 self.Screened_Radio.configure(variable=self.tr_radio)763 self.Screened_Label = tk.Label(Satellite_Single_Window)764 self.Screened_Label.place(relx=0.12, rely=0.257, relheight=0.042, relwidth=0.08)765 self.Screened_Label.configure(background="#40b3a3")766 self.Screened_Label.configure(disabledforeground="#a3a3a3")767 self.Screened_Label.configure(font="-family {Helvetica} -size 10")768 self.Screened_Label.configure(foreground="#000000")769 self.Screened_Label.configure(highlightbackground="#d9d9d9")770 self.Screened_Label.configure(highlightcolor="black")771 self.Screened_Label.configure(relief="groove")772 self.Reffered_Radio = tk.Radiobutton(Satellite_Single_Window)773 self.Reffered_Radio.place(relx=0.208, rely=0.257, relheight=0.042774 , relwidth=0.10)775 self.Reffered_Radio.configure(activebackground="#ececec")776 self.Reffered_Radio.configure(activeforeground="#000000")777 self.Reffered_Radio.configure(background="#d9d9d9")778 self.Reffered_Radio.configure(disabledforeground="#a3a3a3")779 self.Reffered_Radio.configure(font=font11)780 self.Reffered_Radio.configure(foreground="#000000")781 self.Reffered_Radio.configure(highlightbackground="#d9d9d9")782 self.Reffered_Radio.configure(highlightcolor="black")783 self.Reffered_Radio.configure(justify='left')784 self.Reffered_Radio.configure(text='''Reffered''')785 self.Reffered_Radio.configure(value=2)786 self.Reffered_Radio.configure(variable=self.tr_radio)787 self.Reffered_Label = tk.Label(Satellite_Single_Window)788 self.Reffered_Label.place(relx=0.32, rely=0.257, relheight=0.042, relwidth=0.08)789 self.Reffered_Label.configure(background="#40b3a3")790 self.Reffered_Label.configure(disabledforeground="#a3a3a3")791 self.Reffered_Label.configure(font="-family {Helvetica} -size 10")792 self.Reffered_Label.configure(foreground="#000000")793 self.Reffered_Label.configure(highlightbackground="#d9d9d9")794 self.Reffered_Label.configure(highlightcolor="black")795 self.Reffered_Label.configure(relief="groove")796 self.Treated_Radio = tk.Radiobutton(Satellite_Single_Window)797 self.Treated_Radio.place(relx=0.408, rely=0.257, relheight=0.042, relwidth=0.10)798 self.Treated_Radio.configure(activebackground="#ececec")799 self.Treated_Radio.configure(activeforeground="#000000")800 self.Treated_Radio.configure(background="#d9d9d9")801 self.Treated_Radio.configure(disabledforeground="#a3a3a3")802 self.Treated_Radio.configure(font=font11)803 self.Treated_Radio.configure(foreground="#000000")804 self.Treated_Radio.configure(highlightbackground="#d9d9d9")805 self.Treated_Radio.configure(highlightcolor="black")806 self.Treated_Radio.configure(justify='left')807 self.Treated_Radio.configure(text='''Treated''')808 self.Treated_Radio.configure(value=3)809 self.Treated_Radio.configure(variable=self.tr_radio)810 self.Treated_Label = tk.Label(Satellite_Single_Window)811 self.Treated_Label.place(relx=0.52, rely=0.257, relheight=0.042, relwidth=0.08)812 self.Treated_Label.configure(background="#40b3a3")813 self.Treated_Label.configure(disabledforeground="#a3a3a3")814 self.Treated_Label.configure(font="-family {Helvetica} -size 10")815 self.Treated_Label.configure(foreground="#000000")816 self.Treated_Label.configure(highlightbackground="#d9d9d9")817 self.Treated_Label.configure(highlightcolor="black")818 self.Treated_Label.configure(relief="groove")819 self.Grand_Total_Label1 = tk.Label(Satellite_Single_Window)820 self.Grand_Total_Label1.place(relx=0.62, rely=0.257, relheight=0.042, relwidth=0.08)821 self.Grand_Total_Label1.configure(background="#d9d9d9")822 self.Grand_Total_Label1.configure(disabledforeground="#a3a3a3")823 self.Grand_Total_Label1.configure(font="-family {Helvetica} -size 10")824 self.Grand_Total_Label1.configure(foreground="#000000")825 self.Grand_Total_Label1.configure(highlightbackground="#d9d9d9")826 self.Grand_Total_Label1.configure(highlightcolor="black")827 # self.Grand_Total_Label1.configure(relief="groove")828 self.Grand_Total_Label1.configure(text="Grand Total:")829 self.Grand_Total_Label2 = tk.Label(Satellite_Single_Window)830 self.Grand_Total_Label2.place(relx=0.72, rely=0.257, relheight=0.042, relwidth=0.08)831 self.Grand_Total_Label2.configure(background="#40b3a3")832 self.Grand_Total_Label2.configure(disabledforeground="#a3a3a3")833 self.Grand_Total_Label2.configure(font="-family {Helvetica} -size 10")834 self.Grand_Total_Label2.configure(foreground="#000000")835 self.Grand_Total_Label2.configure(highlightbackground="#d9d9d9")836 self.Grand_Total_Label2.configure(highlightcolor="black")837 self.Grand_Total_Label2.configure(relief="groove")838 self.populate_list()839 # Returns the list of all the entries in the window840 def get_entry_object(self):841 Grand_total = tk.IntVar(None, 1)842 entries = [843 self.ID_Entry,844 self.Date_Entry,845 self.tr_radio,846 self.center_radio,847 self.Incharge_Entry,848 self.Phone_Entry,849 self.Patient_Name_Entry,850 self.Patient_Phone_Entry,851 satellite_singe_window_support.Endodontics,852 satellite_singe_window_support.Periodont,853 satellite_singe_window_support.Orthodontics,854 satellite_singe_window_support.Surgery,855 satellite_singe_window_support.Pedodont,856 satellite_singe_window_support.Oralpatho,857 satellite_singe_window_support.Public_Health,858 satellite_singe_window_support.Oral_Mea,859 satellite_singe_window_support.Prostho,860 Grand_total861 ]862 return entries863 # Adds a row to the database' respective table by getting inputs from entries864 def add_item(self):865 # Getting the values entered in each Entry box objects866 if (self.Date_Entry.get() == '' or self.ID_Entry.get() == '' or self.Incharge_Entry.get()=='' or self.Phone_Entry.get()=='' or self.Patient_Name_Entry.get()==''):867 messagebox.showerror("ERROR!", "Please Fill All * Fields")868 else:869 entries = self.get_entry_object()870 for i in range(0, len(entries)):871 entries[i] = entries[i].get()872 # print(entries)873 self.data.insert("satellite", entries)874 self.clear_text()875 self.populate_list()876 print("1 row added")877 # Clears all the data entered in the entries878 def clear_text(self):879 entries = self.get_entry_object()880 # self.He_radio.set(0)881 satellite_singe_window_support.Endodontics.set(0)882 satellite_singe_window_support.Periodont.set(0)883 satellite_singe_window_support.Orthodontics.set(0)884 satellite_singe_window_support.Surgery.set(0)885 satellite_singe_window_support.Pedodont.set(0)886 satellite_singe_window_support.Oralpatho.set(0)887 satellite_singe_window_support.Public_Health.set(0)888 satellite_singe_window_support.Oral_Mea.set(0)889 satellite_singe_window_support.Prostho.set(0)890 for i in range(0, len(entries)):891 try:892 if i != 1:893 entries[i].delete(0, tk.END)894 except AttributeError:895 pass896 # Returns the item selected in the listbox897 def select_item(self):898 index = self.Scrolledtreeview1.focus()899 selected_item = self.Scrolledtreeview1.item(index)900 return selected_item901 # Removes the item selected in the listbox902 # Removes the item selected in the listbox903 def remove_item(self):904 selected = self.select_item()905 new_values = selected["values"]906 # print(new_values)907 self.data.remove("satellite", new_values[0], new_values[1])908 self.populate_list()909 print("Selected Item deleted")910 # Updates the item selected in list box with the values entered in Entry boxes911 def update_item(self):912 selected = self.select_item()913 values = self.get_entry_object()914 # print(selected)915 # print(values)916 # Id of new_values is as same as the old value917 # new_values = [selected[0], selected[1]]918 selected1 = selected["values"]919 new_values = [selected1[0], selected1[1]]920 for i in range(2,len(selected1)):921 if values[i].get()=='':922 new_values.append(selected1[i])923 else:924 new_values.append(values[i].get())925 # print(new_values)926 self.data.update("satellite", new_values)927 self.clear_text()928 self.populate_list()929 print("Selected Item Updated")930 # Updates the list box with the current content of the table931 def populate_list(self):932 i=1933 # self.Scrolledtreeview1.delete(0, tk.END)934 self.Scrolledtreeview1.delete(*self.Scrolledtreeview1.get_children())935 for row in self.data.fetch("satellite"):936 self.Scrolledtreeview1.insert("",'end',text=i,value=row)937 i=i+1938 label_list = [939 self.Endodontics_Label,940 self.Periodont_Label,941 self.Orthodontics_Label,942 self.Surgery_Label,943 self.Pedodont_Label,944 self.Oralpatho_Label,945 self.Public_Health_Label,946 self.Oral_Mea_Label,947 self.Prostho_Label,948 self.Grand_Total_Label949 ]950 counts = self.data.get_total1("satellite", self.data.satellite[8:], self.Date_Entry.get(), self.tr_radio.get(),self.center_radio.get())951 for label in range(len(label_list)):952 label_list[label].configure(text = "%d patients" %(0 if counts[label] == None else counts[label]))953 tot, s, r, t = self.data.sat_func(self.Date_Entry.get(),self.center_radio.get())954 self.Grand_Total_Label2.configure(text="%d patient" % (tot))955 self.Screened_Label.configure(text="%d patient" % (s))956 self.Treated_Label.configure(text="%d patient" % (t))957 self.Reffered_Label.configure(text="%d patient" % (r))958 def satellite(self):959 try:960 satelite_window.create_Toplevel1(rt)961 except:962 satelite_window.create_Toplevel1(root)963# The following code is added to facilitate the Scrolled widgets you specified.964class AutoScroll(object):965 '''Configure the scrollbars for a widget.'''966 def __init__(self, master):967 # Rozen. Added the try-except clauses so that this class968 # could be used for scrolled entry widget for which vertical969 # scrolling is not supported. 5/7/14.970 try:971 vsb = ttk.Scrollbar(master, orient='vertical', command=self.yview)972 except:973 pass974 hsb = ttk.Scrollbar(master, orient='horizontal', command=self.xview)975 #self.configure(yscrollcommand=_autoscroll(vsb),976 # xscrollcommand=_autoscroll(hsb))977 try:978 self.configure(yscrollcommand=self._autoscroll(vsb))979 except:980 pass981 self.configure(xscrollcommand=self._autoscroll(hsb))982 self.grid(column=0, row=0, sticky='nsew')983 try:984 vsb.grid(column=1, row=0, sticky='ns')985 except:986 pass987 hsb.grid(column=0, row=1, sticky='ew')988 master.grid_columnconfigure(0, weight=1)989 master.grid_rowconfigure(0, weight=1)990 # Copy geometry methods of master (taken from ScrolledText.py)991 if py3:992 methods = tk.Pack.__dict__.keys() | tk.Grid.__dict__.keys() \993 | tk.Place.__dict__.keys()994 else:995 methods = tk.Pack.__dict__.keys() + tk.Grid.__dict__.keys() \996 + tk.Place.__dict__.keys()997 for meth in methods:998 if meth[0] != '_' and meth not in ('config', 'configure'):999 setattr(self, meth, getattr(master, meth))1000 @staticmethod1001 def _autoscroll(sbar):1002 '''Hide and show scrollbar as needed.'''1003 def wrapped(first, last):...
turnover_single_window.py
Source:turnover_single_window.py
...73 self.style = ttk.Style()74 self.data = Database("dental.db")75 if sys.platform == "win32":76 self.style.theme_use('winnative')77 self.style.configure('.', background=_bgcolor)78 self.style.configure('.', foreground=_fgcolor)79 self.style.map('.', background=80 [('selected', _compcolor), ('active', _ana2color)])81 Turnover_Single_Window.geometry("1491x739+35+31")82 Turnover_Single_Window.minsize(148, 1)83 Turnover_Single_Window.maxsize(4112, 1055)84 Turnover_Single_Window.resizable(1, 1)85 Turnover_Single_Window.title("Turn Over Window")86 Turnover_Single_Window.configure(background="#40b3a3")87 self.menubar = tk.Menu(Turnover_Single_Window, font=font9, bg=_bgcolor, fg=_fgcolor)88 Turnover_Single_Window.configure(menu=self.menubar)89 self.File = tk.Menu(Turnover_Single_Window, tearoff=0)90 self.menubar.add_cascade(menu=self.File,91 activebackground="#ececec",92 activeforeground="#000000",93 background="#d9d9d9",94 font=(95 '-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),96 foreground="#000000",97 label="File")98 self.File.add_command(99 activebackground="#ececec",100 activeforeground="#000000",101 background="#d9d9d9",102 font=('-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),103 foreground="#000000",104 label="Group Entries",105 command= self.turnover)106 self.File.add_command(107 activebackground="#ececec",108 activeforeground="#000000",109 background="#d9d9d9",110 font=('-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),111 foreground="#000000",112 label="Exit",113 command=turnover_single_window_support.destroy_window)114 self.Department_Label = tk.Label(Turnover_Single_Window)115 self.Department_Label.place(relx=0.241, rely=0.027, relwidth=0.518, relheight=0.084)116 self.Department_Label.configure(activebackground="#f9f9f9")117 self.Department_Label.configure(activeforeground="black")118 self.Department_Label.configure(background="#d9d9d9")119 self.Department_Label.configure(disabledforeground="#a3a3a3")120 self.Department_Label.configure(font="-family {Helvetica} -size 18 -weight normal")121 self.Department_Label.configure(foreground="#000000")122 self.Department_Label.configure(highlightbackground="#d9d9d9")123 self.Department_Label.configure(highlightcolor="black")124 self.Department_Label.configure(relief="raised")125 self.Department_Label.configure(text='''Turn Over Patient''')126 # self.on_radio = tk.IntVar(None, 1)127 # self.Old_Patient_Radio = tk.Radiobutton(Turnover_Single_Window)128 # self.Old_Patient_Radio.place(relx=0.013, rely=0.124, relheight=0.042, relwidth=0.18)129 # self.Old_Patient_Radio.configure(activebackground="#ececec")130 # self.Old_Patient_Radio.configure(activeforeground="#000000")131 # self.Old_Patient_Radio.configure(background="#d9d9d9")132 # self.Old_Patient_Radio.configure(disabledforeground="#a3a3a3")133 # self.Old_Patient_Radio.configure(font=font11)134 # self.Old_Patient_Radio.configure(foreground="#000000")135 # self.Old_Patient_Radio.configure(highlightbackground="#d9d9d9")136 # self.Old_Patient_Radio.configure(highlightcolor="black")137 # self.Old_Patient_Radio.configure(justify='left')138 # self.Old_Patient_Radio.configure(text='''Old Patient''')139 # self.Old_Patient_Radio.configure(value=1)140 # self.Old_Patient_Radio.configure(variable=self.on_radio)141 #142 # self.New_Patient_Radio = tk.Radiobutton(Turnover_Single_Window)143 # self.New_Patient_Radio.place(relx=0.213, rely=0.124, relheight=0.042, relwidth=0.18)144 # self.New_Patient_Radio.configure(activebackground="#ececec")145 # self.New_Patient_Radio.configure(activeforeground="#000000")146 # self.New_Patient_Radio.configure(background="#d9d9d9")147 # self.New_Patient_Radio.configure(disabledforeground="#a3a3a3")148 # self.New_Patient_Radio.configure(font=font11)149 # self.New_Patient_Radio.configure(foreground="#000000")150 # self.New_Patient_Radio.configure(highlightbackground="#d9d9d9")151 # self.New_Patient_Radio.configure(highlightcolor="black")152 # self.New_Patient_Radio.configure(justify='left')153 # self.New_Patient_Radio.configure(text='''New Patient''')154 # self.New_Patient_Radio.configure(value=2)155 # self.New_Patient_Radio.configure(variable=self.on_radio)156 self.Date_Label = tk.Label(Turnover_Single_Window)157 self.Date_Label.place(relx=0.013, rely=0.124, relheight=0.058, relwidth=0.169)158 self.Date_Label.configure(activebackground="#f9f9f9")159 self.Date_Label.configure(activeforeground="black")160 self.Date_Label.configure(background="#d9d9d9")161 self.Date_Label.configure(disabledforeground="#a3a3a3")162 self.Date_Label.configure(font="-family {Helvetica} -size 13 -weight normal")163 self.Date_Label.configure(foreground="#000000")164 self.Date_Label.configure(highlightbackground="#d9d9d9")165 self.Date_Label.configure(highlightcolor="black")166 self.Date_Label.configure(text='''* Date\nYYYY-MM-DD''')167 now = datetime.datetime.now()168 self.Date_Entry = DateEntry(Turnover_Single_Window, year=now.year, month=now.month, day=now.day)169 self.Date_Entry.place(relx=0.193, rely=0.124, relheight=0.042, relwidth=0.18)170 self.Date_Entry.configure(background="white")171 self.Date_Entry.configure(date_pattern='y-mm-dd')172 self.Date_Entry.configure(font="-family {Helvetica} -size 10")173 self.Date_Entry.configure(foreground="#000000")174 self.Date_Entry.configure(borderwidth=2)175 self.Date_Entry.configure(width=12)176 self.He_radio = tk.IntVar(None, 0)177 self.Health_Check = tk.Checkbutton(Turnover_Single_Window)178 self.Health_Check.place(relx=0.413, rely=0.124, relwidth=0.18, relheight=0.042)179 self.Health_Check.configure(activebackground="#ececec")180 self.Health_Check.configure(activeforeground="#000000")181 self.Health_Check.configure(background="#d9d9d9")182 self.Health_Check.configure(disabledforeground="#a3a3a3")183 self.Health_Check.configure(font="-family {Helvetica} -size 13 -weight normal")184 self.Health_Check.configure(foreground="#000000")185 self.Health_Check.configure(highlightbackground="#d9d9d9")186 self.Health_Check.configure(highlightcolor="black")187 self.Health_Check.configure(justify='left')188 self.Health_Check.configure(text='''Health Education''')189 self.Health_Check.configure(variable=self.He_radio)190 self.Health_Label = tk.Label(Turnover_Single_Window)191 self.Health_Label.place(relx=0.599, rely=0.124, relheight=0.048192 , relwidth=0.137)193 self.Health_Label.configure(background="#40b3a3")194 self.Health_Label.configure(disabledforeground="#a3a3a3")195 self.Health_Label.configure(font="-family {Helvetica} -size 10")196 self.Health_Label.configure(foreground="#000000")197 self.Health_Label.configure(highlightbackground="#d9d9d9")198 self.Health_Label.configure(highlightcolor="black")199 self.Health_Label.configure(relief="groove")200 self.Incharge_Label = tk.Label(Turnover_Single_Window)201 self.Incharge_Label.place(relx=0.013, rely=0.189, relwidth=0.169, relheight=0.05)202 self.Incharge_Label.configure(activebackground="#f9f9f9")203 self.Incharge_Label.configure(activeforeground="black")204 self.Incharge_Label.configure(background="#d9d9d9")205 self.Incharge_Label.configure(disabledforeground="#a3a3a3")206 self.Incharge_Label.configure(font="-family {Helvetica} -size 13 -weight normal")207 self.Incharge_Label.configure(foreground="#000000")208 self.Incharge_Label.configure(highlightbackground="#d9d9d9")209 self.Incharge_Label.configure(highlightcolor="black")210 self.Incharge_Label.configure(text='''* Incharge''')211 self.Incharge_Entry = tk.Entry(Turnover_Single_Window)212 self.Incharge_Entry.place(relx=0.188, rely=0.189, relheight=0.048213 , relwidth=0.137)214 self.Incharge_Entry.configure(background="white")215 self.Incharge_Entry.configure(disabledforeground="#a3a3a3")216 self.Incharge_Entry.configure(font="-family {Helvetica} -size 10")217 self.Incharge_Entry.configure(foreground="#000000")218 self.Incharge_Entry.configure(highlightbackground="#d9d9d9")219 self.Incharge_Entry.configure(highlightcolor="black")220 self.Incharge_Entry.configure(insertbackground="black")221 self.Incharge_Entry.configure(selectbackground="#c4c4c4")222 self.Incharge_Entry.configure(selectforeground="black")223 self.Phone_Label = tk.Label(Turnover_Single_Window)224 self.Phone_Label.place(relx=0.335, rely=0.189, relwidth=0.162, relheight=0.05)225 self.Phone_Label.configure(activebackground="#f9f9f9")226 self.Phone_Label.configure(activeforeground="black")227 self.Phone_Label.configure(background="#d9d9d9")228 self.Phone_Label.configure(disabledforeground="#a3a3a3")229 self.Phone_Label.configure(font="-family {Helvetica} -size 13 -weight normal")230 self.Phone_Label.configure(foreground="#000000")231 self.Phone_Label.configure(highlightbackground="#d9d9d9")232 self.Phone_Label.configure(highlightcolor="black")233 self.Phone_Label.configure(text='''* Phone''')234 self.Phone_Entry = tk.Entry(Turnover_Single_Window)235 self.Phone_Entry.place(relx=0.51, rely=0.189, relheight=0.048, relwidth=0.137)236 self.Phone_Entry.configure(background="white")237 self.Phone_Entry.configure(disabledforeground="#a3a3a3")238 self.Phone_Entry.configure(font="-family {Helvetica} -size 10")239 self.Phone_Entry.configure(foreground="#000000")240 self.Phone_Entry.configure(highlightbackground="#d9d9d9")241 self.Phone_Entry.configure(highlightcolor="black")242 self.Phone_Entry.configure(insertbackground="black")243 self.Phone_Entry.configure(selectbackground="#c4c4c4")244 self.Phone_Entry.configure(selectforeground="black")245 # self.Date_Entry = tk.Entry(Turnover_Single_Window)246 # self.Date_Entry.place(relx=0.791, rely=0.189, relheight=0.048, relwidth=0.137)247 # self.Date_Entry.configure(background="white")248 # self.Date_Entry.configure(disabledforeground="#a3a3a3")249 # self.Date_Entry.configure(font="-family {Helvetica} -size 10")250 # self.Date_Entry.configure(foreground="#000000")251 # self.Date_Entry.configure(highlightbackground="#d9d9d9")252 # self.Date_Entry.configure(highlightcolor="black")253 # self.Date_Entry.configure(insertbackground="black")254 # self.Date_Entry.configure(selectbackground="#c4c4c4")255 # self.Date_Entry.configure(selectforeground="black")256 self.ID_Label = tk.Label(Turnover_Single_Window)257 self.ID_Label.place(relx=0.013, rely=0.311, relwidth=0.102, relheight=0.05)258 self.ID_Label.configure(activebackground="#f9f9f9")259 self.ID_Label.configure(activeforeground="black")260 self.ID_Label.configure(background="#d9d9d9")261 self.ID_Label.configure(disabledforeground="#a3a3a3")262 self.ID_Label.configure(font="-family {Helvetica} -size 13 -weight normal")263 self.ID_Label.configure(foreground="#000000")264 self.ID_Label.configure(highlightbackground="#d9d9d9")265 self.ID_Label.configure(highlightcolor="black")266 self.ID_Label.configure(text='''* ID ''')267 self.ID_Entry = tk.Entry(Turnover_Single_Window)268 self.ID_Entry.place(relx=0.12, rely=0.311, relwidth=0.102, relheight=0.048)269 self.ID_Entry.configure(background="white")270 self.ID_Entry.configure(disabledforeground="#a3a3a3")271 self.ID_Entry.configure(font="-family {Helvetica} -size 10")272 self.ID_Entry.configure(foreground="#000000")273 self.ID_Entry.configure(highlightbackground="#d9d9d9")274 self.ID_Entry.configure(highlightcolor="black")275 self.ID_Entry.configure(insertbackground="black")276 self.ID_Entry.configure(selectbackground="#c4c4c4")277 self.ID_Entry.configure(selectforeground="black")278 self.Patient_Name_Label = tk.Label(Turnover_Single_Window)279 self.Patient_Name_Label.place(relx=0.23, rely=0.311, relwidth=0.102, relheight=0.05)280 self.Patient_Name_Label.configure(activebackground="#f9f9f9")281 self.Patient_Name_Label.configure(activeforeground="black")282 self.Patient_Name_Label.configure(background="#d9d9d9")283 self.Patient_Name_Label.configure(disabledforeground="#a3a3a3")284 self.Patient_Name_Label.configure(font="-family {Helvetica} -size 13 -weight normal")285 self.Patient_Name_Label.configure(foreground="#000000")286 self.Patient_Name_Label.configure(highlightbackground="#d9d9d9")287 self.Patient_Name_Label.configure(highlightcolor="black")288 self.Patient_Name_Label.configure(text='''* Patient Name''')289 self.Patient_Name_Entry = tk.Entry(Turnover_Single_Window)290 self.Patient_Name_Entry.place(relx=0.342, rely=0.311, relwidth=0.102, relheight=0.048)291 self.Patient_Name_Entry.configure(background="white")292 self.Patient_Name_Entry.configure(disabledforeground="#a3a3a3")293 self.Patient_Name_Entry.configure(font="-family {Helvetica} -size 10")294 self.Patient_Name_Entry.configure(foreground="#000000")295 self.Patient_Name_Entry.configure(highlightbackground="#d9d9d9")296 self.Patient_Name_Entry.configure(highlightcolor="black")297 self.Patient_Name_Entry.configure(insertbackground="black")298 self.Patient_Name_Entry.configure(selectbackground="#c4c4c4")299 self.Patient_Name_Entry.configure(selectforeground="black")300 self.Patient_Phone_Label = tk.Label(Turnover_Single_Window)301 self.Patient_Phone_Label.place(relx=0.45, rely=0.311, relwidth=0.102, relheight=0.05)302 self.Patient_Phone_Label.configure(activebackground="#f9f9f9")303 self.Patient_Phone_Label.configure(activeforeground="black")304 self.Patient_Phone_Label.configure(background="#d9d9d9")305 self.Patient_Phone_Label.configure(disabledforeground="#a3a3a3")306 self.Patient_Phone_Label.configure(font="-family {Helvetica} -size 13 -weight normal")307 self.Patient_Phone_Label.configure(foreground="#000000")308 self.Patient_Phone_Label.configure(highlightbackground="#d9d9d9")309 self.Patient_Phone_Label.configure(highlightcolor="black")310 self.Patient_Phone_Label.configure(text='''Patient Phone NO''')311 self.Patient_Phone_Entry = tk.Entry(Turnover_Single_Window)312 self.Patient_Phone_Entry.place(relx=0.56, rely=0.311, relwidth=0.089, relheight=0.048)313 self.Patient_Phone_Entry.configure(background="white")314 self.Patient_Phone_Entry.configure(disabledforeground="#a3a3a3")315 self.Patient_Phone_Entry.configure(font="-family {Helvetica} -size 10")316 self.Patient_Phone_Entry.configure(foreground="#000000")317 self.Patient_Phone_Entry.configure(highlightbackground="#d9d9d9")318 self.Patient_Phone_Entry.configure(highlightcolor="black")319 self.Patient_Phone_Entry.configure(insertbackground="black")320 self.Patient_Phone_Entry.configure(selectbackground="#c4c4c4")321 self.Patient_Phone_Entry.configure(selectforeground="black")322 self.Endodontics_Check = tk.Checkbutton(Turnover_Single_Window)323 self.Endodontics_Check.place(relx=0.013, rely=0.379, relwidth=0.162, relheight=0.05)324 self.Endodontics_Check.configure(activebackground="#ececec")325 self.Endodontics_Check.configure(activeforeground="#000000")326 self.Endodontics_Check.configure(background="#d9d9d9")327 self.Endodontics_Check.configure(disabledforeground="#a3a3a3")328 self.Endodontics_Check.configure(font="-family {Helvetica} -size 13 -weight normal")329 self.Endodontics_Check.configure(foreground="#000000")330 self.Endodontics_Check.configure(highlightbackground="#d9d9d9")331 self.Endodontics_Check.configure(highlightcolor="black")332 self.Endodontics_Check.configure(justify='left')333 self.Endodontics_Check.configure(text='''Endodontics ''')334 self.Endodontics_Check.configure(variable=turnover_single_window_support.Endodontics)335 self.Periodont_Check = tk.Checkbutton(Turnover_Single_Window)336 self.Periodont_Check.place(relx=0.013, rely=0.447, relwidth=0.162, relheight=0.05)337 self.Periodont_Check.configure(activebackground="#ececec")338 self.Periodont_Check.configure(activeforeground="#000000")339 self.Periodont_Check.configure(background="#d9d9d9")340 self.Periodont_Check.configure(disabledforeground="#a3a3a3")341 self.Periodont_Check.configure(font="-family {Helvetica} -size 13 -weight normal")342 self.Periodont_Check.configure(foreground="#000000")343 self.Periodont_Check.configure(highlightbackground="#d9d9d9")344 self.Periodont_Check.configure(highlightcolor="black")345 self.Periodont_Check.configure(justify='left')346 self.Periodont_Check.configure(text='''Periodontics ''')347 self.Periodont_Check.configure(variable=turnover_single_window_support.Periodont)348 self.Orthodontics_Check = tk.Checkbutton(Turnover_Single_Window)349 self.Orthodontics_Check.place(relx=0.013, rely=0.514, relwidth=0.162, relheight=0.05)350 self.Orthodontics_Check.configure(activebackground="#ececec")351 self.Orthodontics_Check.configure(activeforeground="#000000")352 self.Orthodontics_Check.configure(background="#d9d9d9")353 self.Orthodontics_Check.configure(disabledforeground="#a3a3a3")354 self.Orthodontics_Check.configure(font="-family {Helvetica} -size 13 -weight normal")355 self.Orthodontics_Check.configure(foreground="#000000")356 self.Orthodontics_Check.configure(highlightbackground="#d9d9d9")357 self.Orthodontics_Check.configure(highlightcolor="black")358 self.Orthodontics_Check.configure(justify='left')359 self.Orthodontics_Check.configure(text='''Orthodontics''')360 self.Orthodontics_Check.configure(variable=turnover_single_window_support.Orthodontics)361 self.Surgery_Check = tk.Checkbutton(Turnover_Single_Window)362 self.Surgery_Check.place(relx=0.013, rely=0.582, relwidth=0.162, relheight=0.05)363 self.Surgery_Check.configure(activebackground="#ececec")364 self.Surgery_Check.configure(activeforeground="#000000")365 self.Surgery_Check.configure(background="#d9d9d9")366 self.Surgery_Check.configure(disabledforeground="#a3a3a3")367 self.Surgery_Check.configure(font="-family {Helvetica} -size 13 -weight normal")368 self.Surgery_Check.configure(foreground="#000000")369 self.Surgery_Check.configure(highlightbackground="#d9d9d9")370 self.Surgery_Check.configure(highlightcolor="black")371 self.Surgery_Check.configure(justify='left')372 self.Surgery_Check.configure(text='''Oral Surgery ''')373 self.Surgery_Check.configure(variable=turnover_single_window_support.Surgery)374 self.Pedodont_Check = tk.Checkbutton(Turnover_Single_Window)375 self.Pedodont_Check.place(relx=0.013, rely=0.65, relwidth=0.162, relheight=0.05)376 self.Pedodont_Check.configure(activebackground="#ececec")377 self.Pedodont_Check.configure(activeforeground="#000000")378 self.Pedodont_Check.configure(background="#d9d9d9")379 self.Pedodont_Check.configure(disabledforeground="#a3a3a3")380 self.Pedodont_Check.configure(font="-family {Helvetica} -size 13 -weight normal")381 self.Pedodont_Check.configure(foreground="#000000")382 self.Pedodont_Check.configure(highlightbackground="#d9d9d9")383 self.Pedodont_Check.configure(highlightcolor="black")384 self.Pedodont_Check.configure(justify='left')385 self.Pedodont_Check.configure(text='''Pedodontics ''')386 self.Pedodont_Check.configure(variable=turnover_single_window_support.Pedodont)387 self.Oralpatho_Check = tk.Checkbutton(Turnover_Single_Window)388 self.Oralpatho_Check.place(relx=0.335, rely=0.379, relwidth=0.162, relheight=0.05)389 self.Oralpatho_Check.configure(activebackground="#ececec")390 self.Oralpatho_Check.configure(activeforeground="#000000")391 self.Oralpatho_Check.configure(background="#d9d9d9")392 self.Oralpatho_Check.configure(disabledforeground="#a3a3a3")393 self.Oralpatho_Check.configure(font="-family {Helvetica} -size 13 -weight normal")394 self.Oralpatho_Check.configure(foreground="#000000")395 self.Oralpatho_Check.configure(highlightbackground="#d9d9d9")396 self.Oralpatho_Check.configure(highlightcolor="black")397 self.Oralpatho_Check.configure(justify='left')398 self.Oralpatho_Check.configure(text='''Oral Pathology''')399 self.Oralpatho_Check.configure(variable=turnover_single_window_support.Oralpatho)400 self.Public_Health_Check = tk.Checkbutton(Turnover_Single_Window)401 self.Public_Health_Check.place(relx=0.335, rely=0.447, relwidth=0.162, relheight=0.05)402 self.Public_Health_Check.configure(activebackground="#ececec")403 self.Public_Health_Check.configure(activeforeground="#000000")404 self.Public_Health_Check.configure(background="#d9d9d9")405 self.Public_Health_Check.configure(disabledforeground="#a3a3a3")406 self.Public_Health_Check.configure(font="-family {Helvetica} -size 13 -weight normal")407 self.Public_Health_Check.configure(foreground="#000000")408 self.Public_Health_Check.configure(highlightbackground="#d9d9d9")409 self.Public_Health_Check.configure(highlightcolor="black")410 self.Public_Health_Check.configure(justify='left')411 self.Public_Health_Check.configure(text='''Public Health ''')412 self.Public_Health_Check.configure(variable=turnover_single_window_support.Public_Health)413 self.Oralmea_Check = tk.Checkbutton(Turnover_Single_Window)414 self.Oralmea_Check.place(relx=0.335, rely=0.514, relwidth=0.162, relheight=0.05)415 self.Oralmea_Check.configure(activebackground="#ececec")416 self.Oralmea_Check.configure(activeforeground="#000000")417 self.Oralmea_Check.configure(background="#d9d9d9")418 self.Oralmea_Check.configure(disabledforeground="#a3a3a3")419 self.Oralmea_Check.configure(font="-family {Helvetica} -size 13 -weight normal")420 self.Oralmea_Check.configure(foreground="#000000")421 self.Oralmea_Check.configure(highlightbackground="#d9d9d9")422 self.Oralmea_Check.configure(highlightcolor="black")423 self.Oralmea_Check.configure(justify='left')424 self.Oralmea_Check.configure(text='''Oral Medicine ''')425 self.Oralmea_Check.configure(variable=turnover_single_window_support.Oral_Mea)426 self.Prostho_Check = tk.Checkbutton(Turnover_Single_Window)427 self.Prostho_Check.place(relx=0.335, rely=0.582, relwidth=0.162, relheight=0.05)428 self.Prostho_Check.configure(activebackground="#ececec")429 self.Prostho_Check.configure(activeforeground="#000000")430 self.Prostho_Check.configure(background="#d9d9d9")431 self.Prostho_Check.configure(disabledforeground="#a3a3a3")432 self.Prostho_Check.configure(font="-family {Helvetica} -size 13 -weight normal")433 self.Prostho_Check.configure(foreground="#000000")434 self.Prostho_Check.configure(highlightbackground="#d9d9d9")435 self.Prostho_Check.configure(highlightcolor="black")436 self.Prostho_Check.configure(justify='left')437 self.Prostho_Check.configure(text='''Prosthodontics ''')438 self.Prostho_Check.configure(variable=turnover_single_window_support.Prostho)439 self.Grand_Total_Label = tk.Label(Turnover_Single_Window)440 self.Grand_Total_Label.place(relx=0.335, rely=0.65, relwidth=0.162, relheight=0.05)441 self.Grand_Total_Label.configure(activebackground="#f9f9f9")442 self.Grand_Total_Label.configure(activeforeground="black")443 self.Grand_Total_Label.configure(background="#d9d9d9")444 self.Grand_Total_Label.configure(disabledforeground="#a3a3a3")445 self.Grand_Total_Label.configure(font="-family {Helvetica} -size 13 -weight normal")446 self.Grand_Total_Label.configure(foreground="#000000")447 self.Grand_Total_Label.configure(highlightbackground="#d9d9d9")448 self.Grand_Total_Label.configure(highlightcolor="black")449 self.Grand_Total_Label.configure(text='''Total''')450 # Defining the entries451 self.Endodontics_Label = tk.Label(Turnover_Single_Window)452 self.Endodontics_Label.place(relx=0.188, rely=0.379, relwidth=0.137, relheight=0.048)453 self.Endodontics_Label.configure(background="#40b3a3")454 self.Endodontics_Label.configure(disabledforeground="#a3a3a3")455 self.Endodontics_Label.configure(font="-family {Helvetica} -size 10")456 self.Endodontics_Label.configure(foreground="#000000")457 self.Endodontics_Label.configure(highlightbackground="#d9d9d9")458 self.Endodontics_Label.configure(highlightcolor="black")459 self.Endodontics_Label.configure(relief="groove")460 self.Periodont_Label = tk.Label(Turnover_Single_Window)461 self.Periodont_Label.place(relx=0.188, rely=0.447, relwidth=0.137, relheight=0.048)462 self.Periodont_Label.configure(background="#40b3a3")463 self.Periodont_Label.configure(disabledforeground="#a3a3a3")464 self.Periodont_Label.configure(font="-family {Helvetica} -size 10")465 self.Periodont_Label.configure(foreground="#000000")466 self.Periodont_Label.configure(highlightbackground="#d9d9d9")467 self.Periodont_Label.configure(highlightcolor="black")468 self.Periodont_Label.configure(relief="groove")469 self.Orthodontics_Label = tk.Label(Turnover_Single_Window)470 self.Orthodontics_Label.place(relx=0.188, rely=0.514, relwidth=0.137, relheight=0.048)471 self.Orthodontics_Label.configure(background="#40b3a3")472 self.Orthodontics_Label.configure(disabledforeground="#a3a3a3")473 self.Orthodontics_Label.configure(font="-family {Helvetica} -size 10")474 self.Orthodontics_Label.configure(foreground="#000000")475 self.Orthodontics_Label.configure(highlightbackground="#d9d9d9")476 self.Orthodontics_Label.configure(highlightcolor="black")477 self.Orthodontics_Label.configure(relief="groove")478 self.Surgery_Label = tk.Label(Turnover_Single_Window)479 self.Surgery_Label.place(relx=0.188, rely=0.582, relwidth=0.137, relheight=0.048)480 self.Surgery_Label.configure(background="#40b3a3")481 self.Surgery_Label.configure(disabledforeground="#a3a3a3")482 self.Surgery_Label.configure(font="-family {Helvetica} -size 10")483 self.Surgery_Label.configure(foreground="#000000")484 self.Surgery_Label.configure(highlightbackground="#d9d9d9")485 self.Surgery_Label.configure(highlightcolor="black")486 self.Surgery_Label.configure(relief="groove")487 self.Pedodont_Label = tk.Label(Turnover_Single_Window)488 self.Pedodont_Label.place(relx=0.188, rely=0.65, relwidth=0.137, relheight=0.048)489 self.Pedodont_Label.configure(background="#40b3a3")490 self.Pedodont_Label.configure(disabledforeground="#a3a3a3")491 self.Pedodont_Label.configure(font="-family {Helvetica} -size 10")492 self.Pedodont_Label.configure(foreground="#000000")493 self.Pedodont_Label.configure(highlightbackground="#d9d9d9")494 self.Pedodont_Label.configure(highlightcolor="black")495 self.Pedodont_Label.configure(relief="groove")496 self.Oralpatho_Label = tk.Label(Turnover_Single_Window)497 self.Oralpatho_Label.place(relx=0.51, rely=0.379, relwidth=0.137, relheight=0.048)498 self.Oralpatho_Label.configure(background="#40b3a3")499 self.Oralpatho_Label.configure(disabledforeground="#a3a3a3")500 self.Oralpatho_Label.configure(font="-family {Helvetica} -size 10")501 self.Oralpatho_Label.configure(foreground="#000000")502 self.Oralpatho_Label.configure(highlightbackground="#d9d9d9")503 self.Oralpatho_Label.configure(highlightcolor="black")504 self.Oralpatho_Label.configure(relief="groove")505 self.Public_Health_Label = tk.Label(Turnover_Single_Window)506 self.Public_Health_Label.place(relx=0.51, rely=0.447, relwidth=0.137, relheight=0.048)507 self.Public_Health_Label.configure(background="#40b3a3")508 self.Public_Health_Label.configure(disabledforeground="#a3a3a3")509 self.Public_Health_Label.configure(font="-family {Helvetica} -size 10")510 self.Public_Health_Label.configure(foreground="#000000")511 self.Public_Health_Label.configure(highlightbackground="#d9d9d9")512 self.Public_Health_Label.configure(highlightcolor="black")513 self.Public_Health_Label.configure(relief="groove")514 self.Oral_Mea_Label = tk.Label(Turnover_Single_Window)515 self.Oral_Mea_Label.place(relx=0.51, rely=0.514, relwidth=0.137, relheight=0.048)516 self.Oral_Mea_Label.configure(background="#40b3a3")517 self.Oral_Mea_Label.configure(disabledforeground="#a3a3a3")518 self.Oral_Mea_Label.configure(font="-family {Helvetica} -size 10")519 self.Oral_Mea_Label.configure(foreground="#000000")520 self.Oral_Mea_Label.configure(highlightbackground="#d9d9d9")521 self.Oral_Mea_Label.configure(highlightcolor="black")522 self.Oral_Mea_Label.configure(relief="groove")523 self.Prostho_Label = tk.Label(Turnover_Single_Window)524 self.Prostho_Label.place(relx=0.51, rely=0.582, relwidth=0.137, relheight=0.048)525 self.Prostho_Label.configure(background="#40b3a3")526 self.Prostho_Label.configure(disabledforeground="#a3a3a3")527 self.Prostho_Label.configure(font="-family {Helvetica} -size 10")528 self.Prostho_Label.configure(foreground="#000000")529 self.Prostho_Label.configure(highlightbackground="#d9d9d9")530 self.Prostho_Label.configure(highlightcolor="black")531 self.Prostho_Label.configure(relief="groove")532 self.Grand_Total_Label = tk.Label(Turnover_Single_Window)533 self.Grand_Total_Label.place(relx=0.51, rely=0.65, relwidth=0.137, relheight=0.048)534 self.Grand_Total_Label.configure(background="#40b3a3")535 self.Grand_Total_Label.configure(disabledforeground="#a3a3a3")536 self.Grand_Total_Label.configure(font="-family {Helvetica} -size 10")537 self.Grand_Total_Label.configure(foreground="#000000")538 self.Grand_Total_Label.configure(highlightbackground="#d9d9d9")539 self.Grand_Total_Label.configure(highlightcolor="black")540 self.Grand_Total_Label.configure(relief="groove")541 self.Add_Button_ = tk.Button(Turnover_Single_Window)542 self.Add_Button_.place(relx=0.798, rely=0.311, relwidth=0.078, relheight=0.06)543 self.Add_Button_.configure(activebackground="#ececec")544 self.Add_Button_.configure(activeforeground="#000000")545 self.Add_Button_.configure(background="#d9d9d9")546 self.Add_Button_.configure(disabledforeground="#a3a3a3")547 self.Add_Button_.configure(font="-family {Helvetica} -size 13 -weight normal")548 self.Add_Button_.configure(foreground="#000000")549 self.Add_Button_.configure(highlightbackground="#d9d9d9")550 self.Add_Button_.configure(highlightcolor="black")551 self.Add_Button_.configure(pady="0")552 self.Add_Button_.configure(text='''ADD''', command=self.add_item)553 self.Delete_Button = tk.Button(Turnover_Single_Window)554 self.Delete_Button.place(relx=0.798, rely=0.392, relwidth=0.078, relheight=0.06)555 self.Delete_Button.configure(activebackground="#ececec")556 self.Delete_Button.configure(activeforeground="#000000")557 self.Delete_Button.configure(background="#d9d9d9")558 self.Delete_Button.configure(disabledforeground="#a3a3a3")559 self.Delete_Button.configure(font="-family {Helvetica} -size 13 -weight normal")560 self.Delete_Button.configure(foreground="#000000")561 self.Delete_Button.configure(highlightbackground="#d9d9d9")562 self.Delete_Button.configure(highlightcolor="black")563 self.Delete_Button.configure(pady="0")564 self.Delete_Button.configure(text='''DELETE''', command=self.remove_item)565 self.Update_Button = tk.Button(Turnover_Single_Window)566 self.Update_Button.place(relx=0.798, rely=0.474, relwidth=0.078, relheight=0.06)567 self.Update_Button.configure(activebackground="#ececec")568 self.Update_Button.configure(activeforeground="#000000")569 self.Update_Button.configure(background="#d9d9d9")570 self.Update_Button.configure(disabledforeground="#a3a3a3")571 self.Update_Button.configure(font="-family {Helvetica} -size 13 -weight normal")572 self.Update_Button.configure(foreground="#000000")573 self.Update_Button.configure(highlightbackground="#d9d9d9")574 self.Update_Button.configure(highlightcolor="black")575 self.Update_Button.configure(pady="0")576 self.Update_Button.configure(text='''UPDATE''', command=self.update_item)577 self.Clear_Button = tk.Button(Turnover_Single_Window)578 self.Clear_Button.place(relx=0.798, rely=0.555, relwidth=0.078, relheight=0.06)579 self.Clear_Button.configure(activebackground="#ececec")580 self.Clear_Button.configure(activeforeground="#000000")581 self.Clear_Button.configure(background="#d9d9d9")582 self.Clear_Button.configure(disabledforeground="#a3a3a3")583 self.Clear_Button.configure(font="-family {Helvetica} -size 13 -weight normal")584 self.Clear_Button.configure(foreground="#000000")585 self.Clear_Button.configure(highlightbackground="#d9d9d9")586 self.Clear_Button.configure(highlightcolor="black")587 self.Clear_Button.configure(pady="0")588 self.Clear_Button.configure(text='''CLEAR''', command=self.clear_text)589 self.Refresh_Button = tk.Button(Turnover_Single_Window)590 self.Refresh_Button.place(relx=0.798, rely=0.63, relwidth=0.078, relheight=0.06)591 self.Refresh_Button.configure(activebackground="#ececec")592 self.Refresh_Button.configure(activeforeground="#000000")593 self.Refresh_Button.configure(background="#d9d9d9")594 self.Refresh_Button.configure(disabledforeground="#a3a3a3")595 self.Refresh_Button.configure(font="-family {Helvetica} -size 13 -weight normal")596 self.Refresh_Button.configure(foreground="#000000")597 self.Refresh_Button.configure(highlightbackground="#d9d9d9")598 self.Refresh_Button.configure(highlightcolor="black")599 self.Refresh_Button.configure(pady="0")600 self.Refresh_Button.configure(text='''REFRESH''', command=self.populate_list)601 self.Scrolledtreeview1 = ScrolledTreeView(Turnover_Single_Window)602 self.Scrolledtreeview1.place(relx=0.02, rely=0.717, relheight=0.253603 , relwidth=0.969)604 self.Scrolledtreeview1.configure(columns=(605 "Id", "Date", "T/R/S", "Incharge", "Phone_no", "Patient_name", "Patient_contact", "Health_education",606 "Endodontics", "Periodont", "Orthodontics", "Surgery", "Pedodont", "Oral_Patho",607 "Public_Health", "Oral_Mea", "Prostho", "Total"))608 # self.Scrolledtreeview1.configure(columns="Col2")609 # self.Scrolledtreeview1.configure(columns="Col3")610 # build_treeview_support starting.611 self.Scrolledtreeview1.heading("#0", text="S.NO")612 self.Scrolledtreeview1.heading("#0", anchor="center")613 self.Scrolledtreeview1.column("#0", width="50")614 self.Scrolledtreeview1.column("#0", minwidth="20")615 self.Scrolledtreeview1.column("#0", stretch="1")616 self.Scrolledtreeview1.column("#0", anchor="center")617 self.Scrolledtreeview1.heading("Id", text="ID")618 self.Scrolledtreeview1.heading("Id", anchor="center")619 self.Scrolledtreeview1.column("Id", width="100")620 self.Scrolledtreeview1.column("Id", minwidth="20")621 self.Scrolledtreeview1.column("Id", stretch="1")622 self.Scrolledtreeview1.column("Id", anchor="center")623 self.Scrolledtreeview1.heading("Date", text="Date")624 self.Scrolledtreeview1.heading("Date", anchor="center")625 self.Scrolledtreeview1.column("Date", width="100")626 self.Scrolledtreeview1.column("Date", minwidth="20")627 self.Scrolledtreeview1.column("Date", stretch="1")628 self.Scrolledtreeview1.column("Date", anchor="w")629 self.Scrolledtreeview1.heading("T/R/S", text="T/R/S")630 self.Scrolledtreeview1.heading("T/R/S", anchor="center")631 self.Scrolledtreeview1.column("T/R/S", width="100")632 self.Scrolledtreeview1.column("T/R/S", minwidth="20")633 self.Scrolledtreeview1.column("T/R/S", stretch="1")634 self.Scrolledtreeview1.column("T/R/S", anchor="center")635 self.Scrolledtreeview1.heading("Incharge", text="Incharge")636 self.Scrolledtreeview1.heading("Incharge", anchor="center")637 self.Scrolledtreeview1.column("Incharge", width="100")638 self.Scrolledtreeview1.column("Incharge", minwidth="20")639 self.Scrolledtreeview1.column("Incharge", stretch="1")640 self.Scrolledtreeview1.column("Incharge", anchor="center")641 self.Scrolledtreeview1.heading("Phone_no", text="Phone no")642 self.Scrolledtreeview1.heading("Phone_no", anchor="center")643 self.Scrolledtreeview1.column("Phone_no", width="100")644 self.Scrolledtreeview1.column("Phone_no", minwidth="20")645 self.Scrolledtreeview1.column("Phone_no", stretch="1")646 self.Scrolledtreeview1.column("Phone_no", anchor="center")647 self.Scrolledtreeview1.heading("Patient_name", text="Patient Name")648 self.Scrolledtreeview1.heading("Patient_name", anchor="center")649 self.Scrolledtreeview1.column("Patient_name", width="100")650 self.Scrolledtreeview1.column("Patient_name", minwidth="20")651 self.Scrolledtreeview1.column("Patient_name", stretch="1")652 self.Scrolledtreeview1.column("Patient_name", anchor="center")653 self.Scrolledtreeview1.heading("Patient_contact", text="Patient Contact")654 self.Scrolledtreeview1.heading("Patient_contact", anchor="center")655 self.Scrolledtreeview1.column("Patient_contact", width="100")656 self.Scrolledtreeview1.column("Patient_contact", minwidth="20")657 self.Scrolledtreeview1.column("Patient_contact", stretch="1")658 self.Scrolledtreeview1.column("Patient_contact", anchor="center")659 self.Scrolledtreeview1.heading("Health_education", text="Health Education given")660 self.Scrolledtreeview1.heading("Health_education", anchor="center")661 self.Scrolledtreeview1.column("Health_education", width="100")662 self.Scrolledtreeview1.column("Health_education", minwidth="20")663 self.Scrolledtreeview1.column("Health_education", stretch="1")664 self.Scrolledtreeview1.column("Health_education", anchor="center")665 self.Scrolledtreeview1.heading("Endodontics", text="Endodontics")666 self.Scrolledtreeview1.heading("Endodontics", anchor="center")667 self.Scrolledtreeview1.column("Endodontics", width="100")668 self.Scrolledtreeview1.column("Endodontics", minwidth="20")669 self.Scrolledtreeview1.column("Endodontics", stretch="1")670 self.Scrolledtreeview1.column("Endodontics", anchor="center")671 self.Scrolledtreeview1.heading("Periodont", text="Periodont")672 self.Scrolledtreeview1.heading("Periodont", anchor="center")673 self.Scrolledtreeview1.column("Periodont", width="100")674 self.Scrolledtreeview1.column("Periodont", minwidth="20")675 self.Scrolledtreeview1.column("Periodont", stretch="1")676 self.Scrolledtreeview1.column("Periodont", anchor="center")677 self.Scrolledtreeview1.heading("Orthodontics", text="Orthodontics")678 self.Scrolledtreeview1.heading("Orthodontics", anchor="center")679 self.Scrolledtreeview1.column("Orthodontics", width="100")680 self.Scrolledtreeview1.column("Orthodontics", minwidth="20")681 self.Scrolledtreeview1.column("Orthodontics", stretch="1")682 self.Scrolledtreeview1.column("Orthodontics", anchor="center")683 self.Scrolledtreeview1.heading("Surgery", text="Surgery")684 self.Scrolledtreeview1.heading("Surgery", anchor="center")685 self.Scrolledtreeview1.column("Surgery", width="100")686 self.Scrolledtreeview1.column("Surgery", minwidth="20")687 self.Scrolledtreeview1.column("Surgery", stretch="1")688 self.Scrolledtreeview1.column("Surgery", anchor="center")689 self.Scrolledtreeview1.heading("Pedodont", text="Pedodont")690 self.Scrolledtreeview1.heading("Pedodont", anchor="center")691 self.Scrolledtreeview1.column("Pedodont", width="100")692 self.Scrolledtreeview1.column("Pedodont", minwidth="20")693 self.Scrolledtreeview1.column("Pedodont", stretch="1")694 self.Scrolledtreeview1.column("Pedodont", anchor="center")695 self.Scrolledtreeview1.heading("Oral_Patho", text="Oral Patho")696 self.Scrolledtreeview1.heading("Oral_Patho", anchor="center")697 self.Scrolledtreeview1.column("Oral_Patho", width="100")698 self.Scrolledtreeview1.column("Oral_Patho", minwidth="20")699 self.Scrolledtreeview1.column("Oral_Patho", stretch="1")700 self.Scrolledtreeview1.column("Oral_Patho", anchor="center")701 self.Scrolledtreeview1.heading("Public_Health", text="Public Health")702 self.Scrolledtreeview1.heading("Public_Health", anchor="center")703 self.Scrolledtreeview1.column("Public_Health", width="100")704 self.Scrolledtreeview1.column("Public_Health", minwidth="20")705 self.Scrolledtreeview1.column("Public_Health", stretch="1")706 self.Scrolledtreeview1.column("Public_Health", anchor="center")707 self.Scrolledtreeview1.heading("Oral_Mea", text="Oral Mea")708 self.Scrolledtreeview1.heading("Oral_Mea", anchor="center")709 self.Scrolledtreeview1.column("Oral_Mea", width="100")710 self.Scrolledtreeview1.column("Oral_Mea", minwidth="20")711 self.Scrolledtreeview1.column("Oral_Mea", stretch="1")712 self.Scrolledtreeview1.column("Oral_Mea", anchor="center")713 self.Scrolledtreeview1.heading("Prostho", text="Prostho")714 self.Scrolledtreeview1.heading("Prostho", anchor="center")715 self.Scrolledtreeview1.column("Prostho", width="100")716 self.Scrolledtreeview1.column("Prostho", minwidth="20")717 self.Scrolledtreeview1.column("Prostho", stretch="1")718 self.Scrolledtreeview1.column("Prostho", anchor="center")719 self.Scrolledtreeview1.heading("Total", text="Total")720 self.Scrolledtreeview1.heading("Total", anchor="center")721 self.Scrolledtreeview1.column("Total", width="100")722 self.Scrolledtreeview1.column("Total", minwidth="20")723 self.Scrolledtreeview1.column("Total", stretch="1")724 self.Scrolledtreeview1.column("Total", anchor="center")725 # self.Scrolledlistbox3 = ScrolledListBox(Turnover_Single_Window)726 # self.Scrolledlistbox3.place(relx=0.02, rely=0.717, relheight=0.253727 # , relwidth=0.969)728 # self.Scrolledlistbox3.configure(background="white")729 # self.Scrolledlistbox3.configure(disabledforeground="#a3a3a3")730 # self.Scrolledlistbox3.configure(font=font10)731 # self.Scrolledlistbox3.configure(foreground="black")732 # self.Scrolledlistbox3.configure(highlightbackground="#d9d9d9")733 # self.Scrolledlistbox3.configure(highlightcolor="#d9d9d9")734 # self.Scrolledlistbox3.configure(selectbackground="#c4c4c4")735 # self.Scrolledlistbox3.configure(selectforeground="black")736 self.tr_radio = tk.IntVar(None, 1)737 self.Screened_Radio = tk.Radiobutton(Turnover_Single_Window)738 self.Screened_Radio.place(relx=0.013, rely=0.257, relheight=0.042, relwidth=0.10)739 self.Screened_Radio.configure(activebackground="#ececec")740 self.Screened_Radio.configure(activeforeground="#000000")741 self.Screened_Radio.configure(background="#d9d9d9")742 self.Screened_Radio.configure(disabledforeground="#a3a3a3")743 self.Screened_Radio.configure(font=font11)744 self.Screened_Radio.configure(foreground="#000000")745 self.Screened_Radio.configure(highlightbackground="#d9d9d9")746 self.Screened_Radio.configure(highlightcolor="black")747 self.Screened_Radio.configure(justify='left')748 self.Screened_Radio.configure(text='''Screened''')749 self.Screened_Radio.configure(value=1)750 self.Screened_Radio.configure(variable=self.tr_radio)751 self.Screened_Label = tk.Label(Turnover_Single_Window)752 self.Screened_Label.place(relx=0.12, rely=0.257, relheight=0.042, relwidth=0.08)753 self.Screened_Label.configure(background="#40b3a3")754 self.Screened_Label.configure(disabledforeground="#a3a3a3")755 self.Screened_Label.configure(font="-family {Helvetica} -size 10")756 self.Screened_Label.configure(foreground="#000000")757 self.Screened_Label.configure(highlightbackground="#d9d9d9")758 self.Screened_Label.configure(highlightcolor="black")759 self.Screened_Label.configure(relief="groove")760 self.Reffered_Radio = tk.Radiobutton(Turnover_Single_Window)761 self.Reffered_Radio.place(relx=0.208, rely=0.257, relheight=0.042762 , relwidth=0.10)763 self.Reffered_Radio.configure(activebackground="#ececec")764 self.Reffered_Radio.configure(activeforeground="#000000")765 self.Reffered_Radio.configure(background="#d9d9d9")766 self.Reffered_Radio.configure(disabledforeground="#a3a3a3")767 self.Reffered_Radio.configure(font=font11)768 self.Reffered_Radio.configure(foreground="#000000")769 self.Reffered_Radio.configure(highlightbackground="#d9d9d9")770 self.Reffered_Radio.configure(highlightcolor="black")771 self.Reffered_Radio.configure(justify='left')772 self.Reffered_Radio.configure(text='''Reffered''')773 self.Reffered_Radio.configure(value=2)774 self.Reffered_Radio.configure(variable=self.tr_radio)775 self.Reffered_Label = tk.Label(Turnover_Single_Window)776 self.Reffered_Label.place(relx=0.32, rely=0.257, relheight=0.042, relwidth=0.08)777 self.Reffered_Label.configure(background="#40b3a3")778 self.Reffered_Label.configure(disabledforeground="#a3a3a3")779 self.Reffered_Label.configure(font="-family {Helvetica} -size 10")780 self.Reffered_Label.configure(foreground="#000000")781 self.Reffered_Label.configure(highlightbackground="#d9d9d9")782 self.Reffered_Label.configure(highlightcolor="black")783 self.Reffered_Label.configure(relief="groove")784 self.Treated_Radio = tk.Radiobutton(Turnover_Single_Window)785 self.Treated_Radio.place(relx=0.408, rely=0.257, relheight=0.042, relwidth=0.10)786 self.Treated_Radio.configure(activebackground="#ececec")787 self.Treated_Radio.configure(activeforeground="#000000")788 self.Treated_Radio.configure(background="#d9d9d9")789 self.Treated_Radio.configure(disabledforeground="#a3a3a3")790 self.Treated_Radio.configure(font=font11)791 self.Treated_Radio.configure(foreground="#000000")792 self.Treated_Radio.configure(highlightbackground="#d9d9d9")793 self.Treated_Radio.configure(highlightcolor="black")794 self.Treated_Radio.configure(justify='left')795 self.Treated_Radio.configure(text='''Treated''')796 self.Treated_Radio.configure(value=3)797 self.Treated_Radio.configure(variable=self.tr_radio)798 self.Treated_Label = tk.Label(Turnover_Single_Window)799 self.Treated_Label.place(relx=0.52, rely=0.257, relheight=0.042, relwidth=0.08)800 self.Treated_Label.configure(background="#40b3a3")801 self.Treated_Label.configure(disabledforeground="#a3a3a3")802 self.Treated_Label.configure(font="-family {Helvetica} -size 10")803 self.Treated_Label.configure(foreground="#000000")804 self.Treated_Label.configure(highlightbackground="#d9d9d9")805 self.Treated_Label.configure(highlightcolor="black")806 self.Treated_Label.configure(relief="groove")807 self.Grand_Total_Label1 = tk.Label(Turnover_Single_Window)808 self.Grand_Total_Label1.place(relx=0.62, rely=0.257, relheight=0.042, relwidth=0.08)809 self.Grand_Total_Label1.configure(background="#d9d9d9")810 self.Grand_Total_Label1.configure(disabledforeground="#a3a3a3")811 self.Grand_Total_Label1.configure(font="-family {Helvetica} -size 10")812 self.Grand_Total_Label1.configure(foreground="#000000")813 self.Grand_Total_Label1.configure(highlightbackground="#d9d9d9")814 self.Grand_Total_Label1.configure(highlightcolor="black")815 # self.Grand_Total_Label1.configure(relief="groove")816 self.Grand_Total_Label1.configure(text="Grand Total:")817 self.Grand_Total_Label2 = tk.Label(Turnover_Single_Window)818 self.Grand_Total_Label2.place(relx=0.72, rely=0.257, relheight=0.042, relwidth=0.08)819 self.Grand_Total_Label2.configure(background="#40b3a3")820 self.Grand_Total_Label2.configure(disabledforeground="#a3a3a3")821 self.Grand_Total_Label2.configure(font="-family {Helvetica} -size 10")822 self.Grand_Total_Label2.configure(foreground="#000000")823 self.Grand_Total_Label2.configure(highlightbackground="#d9d9d9")824 self.Grand_Total_Label2.configure(highlightcolor="black")825 self.Grand_Total_Label2.configure(relief="groove")826 self.populate_list()827 # Returns the list of all the entries in the window828 def get_entry_object(self):829 Grand_Total_Entry = tk.IntVar(None, 1)830 entries = [831 self.ID_Entry,832 self.Date_Entry,833 self.tr_radio,834 # self.on_radio,835 self.Incharge_Entry,836 self.Phone_Entry,837 self.Patient_Name_Entry,838 self.Patient_Phone_Entry,839 self.He_radio,840 turnover_single_window_support.Endodontics,841 turnover_single_window_support.Periodont,842 turnover_single_window_support.Orthodontics,843 turnover_single_window_support.Surgery,844 turnover_single_window_support.Pedodont,845 turnover_single_window_support.Oralpatho,846 turnover_single_window_support.Public_Health,847 turnover_single_window_support.Oral_Mea,848 turnover_single_window_support.Prostho,849 Grand_Total_Entry850 ]851 return entries852 # Adds a row to the database' respective table by getting inputs from entries853 def add_item(self):854 # Getting the values entered in each Entry box objects855 entries = self.get_entry_object()856 if (self.Date_Entry.get()=='' or self.ID_Entry.get()=='' or self.Incharge_Entry.get()=='' or self.Phone_Entry.get()=='' or self.Patient_Name_Entry.get()==''):857 tk.messagebox.showerror("Error!","Please Fill All * Fields")858 else:859 for i in range(0, len(entries)):860 entries[i] = entries[i].get()861 # print(entries)862 self.data.insert("turnover", entries)863 self.clear_text()864 self.populate_list()865 print("1 row added")866 # Clears all the data entered in the entries867 def clear_text(self):868 entries = self.get_entry_object()869 self.He_radio.set(0)870 turnover_single_window_support.Endodontics.set(0)871 turnover_single_window_support.Periodont.set(0)872 turnover_single_window_support.Orthodontics.set(0)873 turnover_single_window_support.Surgery.set(0)874 turnover_single_window_support.Pedodont.set(0)875 turnover_single_window_support.Oralpatho.set(0)876 turnover_single_window_support.Public_Health.set(0)877 turnover_single_window_support.Oral_Mea.set(0)878 turnover_single_window_support.Prostho.set(0)879 for i in range(0, len(entries)):880 try:881 if i != 1:882 entries[i].delete(0, tk.END)883 except AttributeError:884 pass885 # Returns the item selected in the listbox886 def select_item(self):887 index = self.Scrolledtreeview1.focus()888 selected_item = self.Scrolledtreeview1.item(index)889 return selected_item890 # Removes the item selected in the listbox891 def remove_item(self):892 selected = self.select_item()893 new_values = selected["values"]894 # print(new_values)895 self.data.remove("turnover", new_values[0], new_values[1])896 self.populate_list()897 print("Selected Item deleted")898 # Updates the item selected in list box with the values entered in Entry boxes899 def update_item(self):900 selected = self.select_item()901 values = self.get_entry_object()902 # print(selected)903 # print(values)904 # Id of new_values is as same as the old value905 # new_values = [selected[0], selected[1]]906 new_values1 = selected["values"]907 new_values = [new_values1[0], new_values1[1]]908 # for val in values[2:]:909 # new_values.append(val.get())910 for i in range(2,len(new_values1)):911 if values[i].get()=='':912 new_values.append(new_values1[i])913 else:914 new_values.append(values[i].get())915 # print(new_values)916 self.data.update("turnover", new_values)917 self.clear_text()918 self.populate_list()919 print("Selected Item Updated")920 # Updates the list box with the current content of the table921 def populate_list(self):922 i=1923 # self.Scrolledtreeview1.delete(0, tk.END)924 self.Scrolledtreeview1.delete(*self.Scrolledtreeview1.get_children())925 for row in self.data.fetch("turnover"):926 self.Scrolledtreeview1.insert("",'end',text=i,value=row)927 i=i+1928 label_list = [929 self.Endodontics_Label,930 self.Periodont_Label,931 self.Orthodontics_Label,932 self.Surgery_Label,933 self.Pedodont_Label,934 self.Oralpatho_Label,935 self.Public_Health_Label,936 self.Oral_Mea_Label,937 self.Prostho_Label,938 self.Grand_Total_Label939 ]940 counts = self.data.get_total("turnover", self.data.turnover[8:], self.Date_Entry.get(), self.tr_radio.get())941 for label in range(len(label_list)):942 label_list[label].configure(text = "%d patients" %(0 if counts[label] == None else counts[label]))943 tot,h,s,r,t = self.data.turn_Func(self.Date_Entry.get())944 self.Grand_Total_Label2.configure(text="%d patient" %(tot))945 self.Health_Label.configure(text="%d patient" %(h))946 self.Screened_Label.configure(text="%d patient" %(s))947 self.Treated_Label.configure(text="%d patient" %(t))948 self.Reffered_Label.configure(text="%d patient" %(r))949 def turnover(self):950 try:951 turnover_window.create_Toplevel1(rt)952 except:953 turnover_window.create_Toplevel1(root)954# The following code is added to facilitate the Scrolled widgets you specified.955class AutoScroll(object):956 '''Configure the scrollbars for a widget.'''957 def __init__(self, master):958 # Rozen. Added the try-except clauses so that this class959 # could be used for scrolled entry widget for which vertical960 # scrolling is not supported. 5/7/14.961 try:962 vsb = ttk.Scrollbar(master, orient='vertical', command=self.yview)963 except:964 pass965 hsb = ttk.Scrollbar(master, orient='horizontal', command=self.xview)966 #self.configure(yscrollcommand=_autoscroll(vsb),967 # xscrollcommand=_autoscroll(hsb))968 try:969 self.configure(yscrollcommand=self._autoscroll(vsb))970 except:971 pass972 self.configure(xscrollcommand=self._autoscroll(hsb))973 self.grid(column=0, row=0, sticky='nsew')974 try:975 vsb.grid(column=1, row=0, sticky='ns')976 except:977 pass978 hsb.grid(column=0, row=1, sticky='ew')979 master.grid_columnconfigure(0, weight=1)980 master.grid_rowconfigure(0, weight=1)981 # Copy geometry methods of master (taken from ScrolledText.py)982 if py3:983 methods = tk.Pack.__dict__.keys() | tk.Grid.__dict__.keys() \984 | tk.Place.__dict__.keys()985 else:986 methods = tk.Pack.__dict__.keys() + tk.Grid.__dict__.keys() \987 + tk.Place.__dict__.keys()988 for meth in methods:989 if meth[0] != '_' and meth not in ('config', 'configure'):990 setattr(self, meth, getattr(master, meth))991 @staticmethod992 def _autoscroll(sbar):993 '''Hide and show scrollbar as needed.'''994 def wrapped(first, last):...
turnover_window.py
Source:turnover_window.py
...59 self.style = ttk.Style()60 self.data = Database("dental.db")61 if sys.platform == "win32":62 self.style.theme_use('winnative')63 self.style.configure('.', background=_bgcolor)64 self.style.configure('.', foreground=_fgcolor)65 self.style.map('.', background=66 [('selected', _compcolor), ('active', _ana2color)])67 Turnover_Camp_Window.geometry("1491x764+35+31")68 Turnover_Camp_Window.minsize(148, 1)69 Turnover_Camp_Window.maxsize(4112, 1030)70 Turnover_Camp_Window.resizable(1, 1)71 Turnover_Camp_Window.title("TURNOVER CAMP ")72 Turnover_Camp_Window.configure(background="#40b3a2")73 self.menubar = tk.Menu(Turnover_Camp_Window, font=font9, bg=_bgcolor, fg=_fgcolor)74 Turnover_Camp_Window.configure(menu=self.menubar)75 self.File = tk.Menu(Turnover_Camp_Window, tearoff=0)76 self.menubar.add_cascade(menu=self.File,77 activebackground="#ececec",78 activeforeground="#000000",79 background="#d9d9d9",80 compound="left",81 foreground="#000000",82 label="File")83 self.File.add_command(84 activebackground="#ececec",85 activeforeground="#000000",86 background="#d9d9d9",87 foreground="#000000",88 label="Exit",89 command=turnover_window_support.destroy_window)90 self.Screen_Camp_Label = tk.Label(Turnover_Camp_Window)91 self.Screen_Camp_Label.place(relx=0.201, rely=0.027, relwidth=0.518, relheight=0.084)92 self.Screen_Camp_Label.configure(activebackground="#f9f9f9")93 self.Screen_Camp_Label.configure(activeforeground="black")94 self.Screen_Camp_Label.configure(background="#d9d9d9")95 self.Screen_Camp_Label.configure(disabledforeground="#a3a3a3")96 self.Screen_Camp_Label.configure(font="-family {Helvatica} -size 18 -weight normal")97 self.Screen_Camp_Label.configure(foreground="#000000")98 self.Screen_Camp_Label.configure(highlightbackground="#d9d9d9")99 self.Screen_Camp_Label.configure(highlightcolor="black")100 self.Screen_Camp_Label.configure(relief="raised")101 self.Screen_Camp_Label.configure(text='''Turnover Camp Patient''')102 self.Date_Label = tk.Label(Turnover_Camp_Window)103 self.Date_Label.place(relx=0.013, rely=0.12, relwidth=0.169, relheight=0.05)104 self.Date_Label.configure(activebackground="#f9f9f9")105 self.Date_Label.configure(activeforeground="black")106 self.Date_Label.configure(background="#d9d9d9")107 self.Date_Label.configure(disabledforeground="#a3a3a3")108 self.Date_Label.configure(font="-family {Helvetica} -size 13 -weight normal -slant " \109 "roman -underline 0 -overstrike 0")110 self.Date_Label.configure(foreground="#000000")111 self.Date_Label.configure(highlightbackground="#d9d9d9")112 self.Date_Label.configure(highlightcolor="black")113 self.Date_Label.configure(text='''Date\nYYYY-MM-DD''')114 now = datetime.datetime.now()115 self.Date_Entry = DateEntry(Turnover_Camp_Window, year=now.year, month=now.month, day=now.day)116 self.Date_Entry.place(relx=0.188, rely=0.12, relheight=0.048, relwidth=0.137)117 self.Date_Entry.configure(background="white")118 self.Date_Entry.configure(date_pattern='y/mm/dd')119 self.Date_Entry.configure(font="-family {Helvetica} -size 10")120 self.Date_Entry.configure(foreground="#000000")121 self.Date_Entry.configure(borderwidth=2)122 self.Date_Entry.configure(width=12)123 # self.Date_Entry = tk.Entry(Turnover_Camp_Window)124 # self.Date_Entry.place(relx=0.188, rely=0.12, relheight=0.048, relwidth=0.137)125 # self.Date_Entry.configure(background="white")126 # self.Date_Entry.configure(disabledforeground="#a3a3a3")127 # self.Date_Entry.configure(font="-family {Helvetica} -size 15 -weight normal -slant " \128 # "roman -underline 0 -overstrike 0")129 # self.Date_Entry.configure(foreground="#000000")130 # self.Date_Entry.configure(highlightbackground="#d9d9d9")131 # self.Date_Entry.configure(highlightcolor="black")132 # self.Date_Entry.configure(insertbackground="black")133 # self.Date_Entry.configure(selectbackground="#c4c4c4")134 # self.Date_Entry.configure(selectforeground="black")135 self.Place_Label = tk.Label(Turnover_Camp_Window)136 self.Place_Label.place(relx=0.335, rely=0.12, relwidth=0.162, relheight=0.05)137 self.Place_Label.configure(activebackground="#f9f9f9")138 self.Place_Label.configure(activeforeground="black")139 self.Place_Label.configure(background="#d9d9d9")140 self.Place_Label.configure(disabledforeground="#a3a3a3")141 self.Place_Label.configure(font="-family {Helvetica} -size 13 -weight normal -slant " \142 "roman -underline 0 -overstrike 0")143 self.Place_Label.configure(foreground="#000000")144 self.Place_Label.configure(highlightbackground="#d9d9d9")145 self.Place_Label.configure(highlightcolor="black")146 self.Place_Label.configure(text='''Place''')147 self.Place_Entry = tk.Entry(Turnover_Camp_Window)148 self.Place_Entry.place(relx=0.51, rely=0.12, relheight=0.048, relwidth=0.137)149 self.Place_Entry.configure(background="white")150 self.Place_Entry.configure(disabledforeground="#a3a3a3")151 self.Place_Entry.configure(font="-family {Helvetica} -size 15 -weight normal -slant " \152 "roman -underline 0 -overstrike 0")153 self.Place_Entry.configure(foreground="#000000")154 self.Place_Entry.configure(highlightbackground="#d9d9d9")155 self.Place_Entry.configure(highlightcolor="black")156 self.Place_Entry.configure(insertbackground="black")157 self.Place_Entry.configure(selectbackground="#c4c4c4")158 self.Place_Entry.configure(selectforeground="black")159 self.Address_Label = tk.Label(Turnover_Camp_Window)160 self.Address_Label.place(relx=0.655, rely=0.12, relwidth=0.162, relheight=0.05)161 self.Address_Label.configure(activebackground="#f9f9f9")162 self.Address_Label.configure(activeforeground="black")163 self.Address_Label.configure(background="#d9d9d9")164 self.Address_Label.configure(disabledforeground="#a3a3a3")165 self.Address_Label.configure(font="-family {Helvetica} -size 13 -weight normal -slant " \166 "roman -underline 0 -overstrike 0")167 self.Address_Label.configure(foreground="#000000")168 self.Address_Label.configure(highlightbackground="#d9d9d9")169 self.Address_Label.configure(highlightcolor="black")170 self.Address_Label.configure(text='''Address''')171 self.Address_Entry = tk.Entry(Turnover_Camp_Window)172 self.Address_Entry.place(relx=0.83, rely=0.12, relheight=0.048, relwidth=0.157)173 self.Address_Entry.configure(background="white")174 self.Address_Entry.configure(disabledforeground="#a3a3a3")175 self.Address_Entry.configure(font="-family {Helvetica} -size 13 -weight normal -slant " \176 "roman -underline 0 -overstrike 0")177 self.Address_Entry.configure(foreground="#000000")178 self.Address_Entry.configure(highlightbackground="#d9d9d9")179 self.Address_Entry.configure(highlightcolor="black")180 self.Address_Entry.configure(insertbackground="black")181 self.Address_Entry.configure(selectbackground="#c4c4c4")182 self.Address_Entry.configure(selectforeground="black")183 self.Organiser_Label = tk.Label(Turnover_Camp_Window)184 self.Organiser_Label.place(relx=0.013, rely=0.189, relwidth=0.109, relheight=0.05)185 self.Organiser_Label.configure(activebackground="#f9f9f9")186 self.Organiser_Label.configure(activeforeground="black")187 self.Organiser_Label.configure(background="#d9d9d9")188 self.Organiser_Label.configure(disabledforeground="#a3a3a3")189 self.Organiser_Label.configure(font="-family {Helvatica} -size 13 -weight normal")190 self.Organiser_Label.configure(foreground="#000000")191 self.Organiser_Label.configure(highlightbackground="#d9d9d9")192 self.Organiser_Label.configure(highlightcolor="black")193 self.Organiser_Label.configure(text='''Organiser''')194 self.Organiser_Entry = tk.Entry(Turnover_Camp_Window)195 self.Organiser_Entry.place(relx=0.129, rely=0.189, relheight=0.048196 , relwidth=0.107)197 self.Organiser_Entry.configure(background="white")198 self.Organiser_Entry.configure(disabledforeground="#a3a3a3")199 self.Organiser_Entry.configure(font="-family {Helvatica} -size 10")200 self.Organiser_Entry.configure(foreground="#000000")201 self.Organiser_Entry.configure(highlightbackground="#d9d9d9")202 self.Organiser_Entry.configure(highlightcolor="black")203 self.Organiser_Entry.configure(insertbackground="black")204 self.Organiser_Entry.configure(selectbackground="#c4c4c4")205 self.Organiser_Entry.configure(selectforeground="black")206 self.OPhone_Label = tk.Label(Turnover_Camp_Window)207 self.OPhone_Label.place(relx=0.243, rely=0.189, relwidth=0.109, relheight=0.05)208 self.OPhone_Label.configure(activebackground="#f9f9f9")209 self.OPhone_Label.configure(activeforeground="black")210 self.OPhone_Label.configure(background="#d9d9d9")211 self.OPhone_Label.configure(disabledforeground="#a3a3a3")212 self.OPhone_Label.configure(font="-family {Helvatica} -size 13 -weight normal")213 self.OPhone_Label.configure(foreground="#000000")214 self.OPhone_Label.configure(highlightbackground="#d9d9d9")215 self.OPhone_Label.configure(highlightcolor="black")216 self.OPhone_Label.configure(text='''Phone''')217 self.OPhone_Entry = tk.Entry(Turnover_Camp_Window)218 self.OPhone_Entry.place(relx=0.360, rely=0.189, relheight=0.048, relwidth=0.107)219 self.OPhone_Entry.configure(background="white")220 self.OPhone_Entry.configure(disabledforeground="#a3a3a3")221 self.OPhone_Entry.configure(font="-family {Helvatica} -size 10")222 self.OPhone_Entry.configure(foreground="#000000")223 self.OPhone_Entry.configure(highlightbackground="#d9d9d9")224 self.OPhone_Entry.configure(highlightcolor="black")225 self.OPhone_Entry.configure(insertbackground="black")226 self.OPhone_Entry.configure(selectbackground="#c4c4c4")227 self.OPhone_Entry.configure(selectforeground="black")228 self.Incharge_Label = tk.Label(Turnover_Camp_Window)229 self.Incharge_Label.place(relx=0.480, rely=0.189, relwidth=0.109, relheight=0.05)230 self.Incharge_Label.configure(activebackground="#f9f9f9")231 self.Incharge_Label.configure(activeforeground="black")232 self.Incharge_Label.configure(background="#d9d9d9")233 self.Incharge_Label.configure(disabledforeground="#a3a3a3")234 self.Incharge_Label.configure(font="-family {Helvatica} -size 13 -weight normal")235 self.Incharge_Label.configure(foreground="#000000")236 self.Incharge_Label.configure(highlightbackground="#d9d9d9")237 self.Incharge_Label.configure(highlightcolor="black")238 self.Incharge_Label.configure(text='''Incharge''')239 self.Incharge_Entry = tk.Entry(Turnover_Camp_Window)240 self.Incharge_Entry.place(relx=0.60, rely=0.189, relheight=0.048, relwidth=0.107)241 self.Incharge_Entry.configure(background="white")242 self.Incharge_Entry.configure(disabledforeground="#a3a3a3")243 self.Incharge_Entry.configure(font="-family {Helvatica} -size 10")244 self.Incharge_Entry.configure(foreground="#000000")245 self.Incharge_Entry.configure(highlightbackground="#d9d9d9")246 self.Incharge_Entry.configure(highlightcolor="black")247 self.Incharge_Entry.configure(insertbackground="black")248 self.Incharge_Entry.configure(selectbackground="#c4c4c4")249 self.Incharge_Entry.configure(selectforeground="black")250 self.IPhone_Label = tk.Label(Turnover_Camp_Window)251 self.IPhone_Label.place(relx=0.720, rely=0.189, relwidth=0.109, relheight=0.05)252 self.IPhone_Label.configure(activebackground="#f9f9f9")253 self.IPhone_Label.configure(activeforeground="black")254 self.IPhone_Label.configure(background="#d9d9d9")255 self.IPhone_Label.configure(disabledforeground="#a3a3a3")256 self.IPhone_Label.configure(font="-family {Helvatica} -size 13 -weight normal")257 self.IPhone_Label.configure(foreground="#000000")258 self.IPhone_Label.configure(highlightbackground="#d9d9d9")259 self.IPhone_Label.configure(highlightcolor="black")260 self.IPhone_Label.configure(text='''Phone''')261 self.IPhone_Entry = tk.Entry(Turnover_Camp_Window)262 self.IPhone_Entry.place(relx=0.840, rely=0.189, relheight=0.048, relwidth=0.107)263 self.IPhone_Entry.configure(background="white")264 self.IPhone_Entry.configure(disabledforeground="#a3a3a3")265 self.IPhone_Entry.configure(font="-family {Helvatica} -size 10")266 self.IPhone_Entry.configure(foreground="#000000")267 self.IPhone_Entry.configure(highlightbackground="#d9d9d9")268 self.IPhone_Entry.configure(highlightcolor="black")269 self.IPhone_Entry.configure(insertbackground="black")270 self.IPhone_Entry.configure(selectbackground="#c4c4c4")271 self.IPhone_Entry.configure(selectforeground="black")272 self.From_Label = tk.Label(Turnover_Camp_Window)273 self.From_Label.place(relx=0.013, rely=0.311, relwidth=0.162, relheight=0.05)274 self.From_Label.configure(activebackground="#f9f9f9")275 self.From_Label.configure(activeforeground="black")276 self.From_Label.configure(background="#d9d9d9")277 self.From_Label.configure(disabledforeground="#a3a3a3")278 self.From_Label.configure(font="-family {Helvatica} -size 13 -weight normal")279 self.From_Label.configure(foreground="#000000")280 self.From_Label.configure(highlightbackground="#d9d9d9")281 self.From_Label.configure(highlightcolor="black")282 self.From_Label.configure(text='''ID From''')283 self.From_Entry = tk.Entry(Turnover_Camp_Window)284 self.From_Entry.place(relx=0.188, rely=0.311, relwidth=0.137, relheight=0.048)285 self.From_Entry.configure(background="white")286 self.From_Entry.configure(disabledforeground="#a3a3a3")287 self.From_Entry.configure(font="-family {Helvatica} -size 10")288 self.From_Entry.configure(foreground="#000000")289 self.From_Entry.configure(highlightbackground="#d9d9d9")290 self.From_Entry.configure(highlightcolor="black")291 self.From_Entry.configure(insertbackground="black")292 self.From_Entry.configure(selectbackground="#c4c4c4")293 self.From_Entry.configure(selectforeground="black")294 self.To_Label = tk.Label(Turnover_Camp_Window)295 self.To_Label.place(relx=0.335, rely=0.311, relwidth=0.162, relheight=0.05)296 self.To_Label.configure(activebackground="#f9f9f9")297 self.To_Label.configure(activeforeground="black")298 self.To_Label.configure(background="#d9d9d9")299 self.To_Label.configure(disabledforeground="#a3a3a3")300 self.To_Label.configure(font="-family {Helvatica} -size 13 -weight normal")301 self.To_Label.configure(foreground="#000000")302 self.To_Label.configure(highlightbackground="#d9d9d9")303 self.To_Label.configure(highlightcolor="black")304 self.To_Label.configure(text='''ID To''')305 self.To_Entry = tk.Entry(Turnover_Camp_Window)306 self.To_Entry.place(relx=0.51, rely=0.311, relwidth=0.137, relheight=0.048)307 self.To_Entry.configure(background="white")308 self.To_Entry.configure(disabledforeground="#a3a3a3")309 self.To_Entry.configure(font="-family {Helvatica} -size 10")310 self.To_Entry.configure(foreground="#000000")311 self.To_Entry.configure(highlightbackground="#d9d9d9")312 self.To_Entry.configure(highlightcolor="black")313 self.To_Entry.configure(insertbackground="black")314 self.To_Entry.configure(selectbackground="#c4c4c4")315 self.To_Entry.configure(selectforeground="black")316 self.Endodontics_Label = tk.Label(Turnover_Camp_Window)317 self.Endodontics_Label.place(relx=0.013, rely=0.379, relwidth=0.162, relheight=0.05)318 self.Endodontics_Label.configure(activebackground="#f9f9f9")319 self.Endodontics_Label.configure(activeforeground="black")320 self.Endodontics_Label.configure(background="#d9d9d9")321 self.Endodontics_Label.configure(disabledforeground="#a3a3a3")322 self.Endodontics_Label.configure(font="-family {Helvatica} -size 13 -weight normal")323 self.Endodontics_Label.configure(foreground="#000000")324 self.Endodontics_Label.configure(highlightbackground="#d9d9d9")325 self.Endodontics_Label.configure(highlightcolor="black")326 self.Endodontics_Label.configure(text='''Endodontics''')327 self.Periodont_Label = tk.Label(Turnover_Camp_Window)328 self.Periodont_Label.place(relx=0.013, rely=0.447, relwidth=0.162, relheight=0.05)329 self.Periodont_Label.configure(activebackground="#f9f9f9")330 self.Periodont_Label.configure(activeforeground="black")331 self.Periodont_Label.configure(background="#d9d9d9")332 self.Periodont_Label.configure(disabledforeground="#a3a3a3")333 self.Periodont_Label.configure(font="-family {Helvatica} -size 13 -weight normal")334 self.Periodont_Label.configure(foreground="#000000")335 self.Periodont_Label.configure(highlightbackground="#d9d9d9")336 self.Periodont_Label.configure(highlightcolor="black")337 self.Periodont_Label.configure(text='''Periodont''')338 self.Orthodontics_Label = tk.Label(Turnover_Camp_Window)339 self.Orthodontics_Label.place(relx=0.013, rely=0.514, relwidth=0.162, relheight=0.05)340 self.Orthodontics_Label.configure(activebackground="#f9f9f9")341 self.Orthodontics_Label.configure(activeforeground="black")342 self.Orthodontics_Label.configure(background="#d9d9d9")343 self.Orthodontics_Label.configure(disabledforeground="#a3a3a3")344 self.Orthodontics_Label.configure(font="-family {Helvatica} -size 13 -weight normal")345 self.Orthodontics_Label.configure(foreground="#000000")346 self.Orthodontics_Label.configure(highlightbackground="#d9d9d9")347 self.Orthodontics_Label.configure(highlightcolor="black")348 self.Orthodontics_Label.configure(text='''Orthodontics''')349 self.Surgery_Label = tk.Label(Turnover_Camp_Window)350 self.Surgery_Label.place(relx=0.013, rely=0.582, relwidth=0.162, relheight=0.05)351 self.Surgery_Label.configure(activebackground="#f9f9f9")352 self.Surgery_Label.configure(activeforeground="black")353 self.Surgery_Label.configure(background="#d9d9d9")354 self.Surgery_Label.configure(disabledforeground="#a3a3a3")355 self.Surgery_Label.configure(font="-family {Helvatica} -size 13 -weight normal")356 self.Surgery_Label.configure(foreground="#000000")357 self.Surgery_Label.configure(highlightbackground="#d9d9d9")358 self.Surgery_Label.configure(highlightcolor="black")359 self.Surgery_Label.configure(text='''Surgery''')360 self.Pedodont_Label = tk.Label(Turnover_Camp_Window)361 self.Pedodont_Label.place(relx=0.013, rely=0.65, relwidth=0.162, relheight=0.05)362 self.Pedodont_Label.configure(activebackground="#f9f9f9")363 self.Pedodont_Label.configure(activeforeground="black")364 self.Pedodont_Label.configure(background="#d9d9d9")365 self.Pedodont_Label.configure(disabledforeground="#a3a3a3")366 self.Pedodont_Label.configure(font="-family {Helvatica} -size 13 -weight normal")367 self.Pedodont_Label.configure(foreground="#000000")368 self.Pedodont_Label.configure(highlightbackground="#d9d9d9")369 self.Pedodont_Label.configure(highlightcolor="black")370 self.Pedodont_Label.configure(text='''Pedodont''')371 self.Endodontics_Entry = tk.Entry(Turnover_Camp_Window)372 self.Endodontics_Entry.place(relx=0.188, rely=0.379, relwidth=0.137, relheight=0.048)373 self.Endodontics_Entry.configure(background="white")374 self.Endodontics_Entry.configure(disabledforeground="#a3a3a3")375 self.Endodontics_Entry.configure(font="-family {Helvatica} -size 10")376 self.Endodontics_Entry.configure(foreground="#000000")377 self.Endodontics_Entry.configure(highlightbackground="#d9d9d9")378 self.Endodontics_Entry.configure(highlightcolor="black")379 self.Endodontics_Entry.configure(insertbackground="black")380 self.Endodontics_Entry.configure(selectbackground="#c4c4c4")381 self.Endodontics_Entry.configure(selectforeground="black")382 self.Periodont_Entry = tk.Entry(Turnover_Camp_Window)383 self.Periodont_Entry.place(relx=0.188, rely=0.447, relwidth=0.137, relheight=0.048)384 self.Periodont_Entry.configure(background="white")385 self.Periodont_Entry.configure(disabledforeground="#a3a3a3")386 self.Periodont_Entry.configure(font="-family {Helvatica} -size 10")387 self.Periodont_Entry.configure(foreground="#000000")388 self.Periodont_Entry.configure(highlightbackground="#d9d9d9")389 self.Periodont_Entry.configure(highlightcolor="black")390 self.Periodont_Entry.configure(insertbackground="black")391 self.Periodont_Entry.configure(selectbackground="#c4c4c4")392 self.Periodont_Entry.configure(selectforeground="black")393 self.Orthodontics_Entry = tk.Entry(Turnover_Camp_Window)394 self.Orthodontics_Entry.place(relx=0.188, rely=0.514, relwidth=0.137, relheight=0.048)395 self.Orthodontics_Entry.configure(background="white")396 self.Orthodontics_Entry.configure(disabledforeground="#a3a3a3")397 self.Orthodontics_Entry.configure(font="-family {Helvatica} -size 10")398 self.Orthodontics_Entry.configure(foreground="#000000")399 self.Orthodontics_Entry.configure(highlightbackground="#d9d9d9")400 self.Orthodontics_Entry.configure(highlightcolor="black")401 self.Orthodontics_Entry.configure(insertbackground="black")402 self.Orthodontics_Entry.configure(selectbackground="#c4c4c4")403 self.Orthodontics_Entry.configure(selectforeground="black")404 self.Surgery_Entry = tk.Entry(Turnover_Camp_Window)405 self.Surgery_Entry.place(relx=0.188, rely=0.582, relwidth=0.137, relheight=0.048)406 self.Surgery_Entry.configure(background="white")407 self.Surgery_Entry.configure(disabledforeground="#a3a3a3")408 self.Surgery_Entry.configure(font="-family {Helvatica} -size 10")409 self.Surgery_Entry.configure(foreground="#000000")410 self.Surgery_Entry.configure(highlightbackground="#d9d9d9")411 self.Surgery_Entry.configure(highlightcolor="black")412 self.Surgery_Entry.configure(insertbackground="black")413 self.Surgery_Entry.configure(selectbackground="#c4c4c4")414 self.Surgery_Entry.configure(selectforeground="black")415 self.Pedodont_Entry = tk.Entry(Turnover_Camp_Window)416 self.Pedodont_Entry.place(relx=0.188, rely=0.65, relwidth=0.137, relheight=0.048)417 self.Pedodont_Entry.configure(background="white")418 self.Pedodont_Entry.configure(disabledforeground="#a3a3a3")419 self.Pedodont_Entry.configure(font="-family {Helvatica} -size 10")420 self.Pedodont_Entry.configure(foreground="#000000")421 self.Pedodont_Entry.configure(highlightbackground="#d9d9d9")422 self.Pedodont_Entry.configure(highlightcolor="black")423 self.Pedodont_Entry.configure(insertbackground="black")424 self.Pedodont_Entry.configure(selectbackground="#c4c4c4")425 self.Pedodont_Entry.configure(selectforeground="black")426 self.Oralpatho_Entry = tk.Entry(Turnover_Camp_Window)427 self.Oralpatho_Entry.place(relx=0.51, rely=0.379, relwidth=0.137, relheight=0.048)428 self.Oralpatho_Entry.configure(background="white")429 self.Oralpatho_Entry.configure(disabledforeground="#a3a3a3")430 self.Oralpatho_Entry.configure(font="-family {Helvatica} -size 10")431 self.Oralpatho_Entry.configure(foreground="#000000")432 self.Oralpatho_Entry.configure(highlightbackground="#d9d9d9")433 self.Oralpatho_Entry.configure(highlightcolor="black")434 self.Oralpatho_Entry.configure(insertbackground="black")435 self.Oralpatho_Entry.configure(selectbackground="#c4c4c4")436 self.Oralpatho_Entry.configure(selectforeground="black")437 self.Public_Health_Entry = tk.Entry(Turnover_Camp_Window)438 self.Public_Health_Entry.place(relx=0.51, rely=0.447, relwidth=0.137, relheight=0.048)439 self.Public_Health_Entry.configure(background="white")440 self.Public_Health_Entry.configure(disabledforeground="#a3a3a3")441 self.Public_Health_Entry.configure(font="-family {Helvatica} -size 10")442 self.Public_Health_Entry.configure(foreground="#000000")443 self.Public_Health_Entry.configure(highlightbackground="#d9d9d9")444 self.Public_Health_Entry.configure(highlightcolor="black")445 self.Public_Health_Entry.configure(insertbackground="black")446 self.Public_Health_Entry.configure(selectbackground="#c4c4c4")447 self.Public_Health_Entry.configure(selectforeground="black")448 self.Prostho_Entry = tk.Entry(Turnover_Camp_Window)449 self.Prostho_Entry.place(relx=0.51, rely=0.582, relwidth=0.137, relheight=0.048)450 self.Prostho_Entry.configure(background="white")451 self.Prostho_Entry.configure(disabledforeground="#a3a3a3")452 self.Prostho_Entry.configure(font="-family {Helvatica} -size 10")453 self.Prostho_Entry.configure(foreground="#000000")454 self.Prostho_Entry.configure(highlightbackground="#d9d9d9")455 self.Prostho_Entry.configure(highlightcolor="black")456 self.Prostho_Entry.configure(insertbackground="black")457 self.Prostho_Entry.configure(selectbackground="#c4c4c4")458 self.Prostho_Entry.configure(selectforeground="black")459 self.Oral_Mea_Entry = tk.Entry(Turnover_Camp_Window)460 self.Oral_Mea_Entry.place(relx=0.51, rely=0.514, relwidth=0.137, relheight=0.048)461 self.Oral_Mea_Entry.configure(background="white")462 self.Oral_Mea_Entry.configure(disabledforeground="#a3a3a3")463 self.Oral_Mea_Entry.configure(font="-family {Helvatica} -size 10")464 self.Oral_Mea_Entry.configure(foreground="#000000")465 self.Oral_Mea_Entry.configure(highlightbackground="#d9d9d9")466 self.Oral_Mea_Entry.configure(highlightcolor="black")467 self.Oral_Mea_Entry.configure(insertbackground="black")468 self.Oral_Mea_Entry.configure(selectbackground="#c4c4c4")469 self.Oral_Mea_Entry.configure(selectforeground="black")470 self.Grand_Total_Entry = tk.Entry(Turnover_Camp_Window)471 self.Grand_Total_Entry.place(relx=0.51, rely=0.65, relwidth=0.137, relheight=0.048)472 self.Grand_Total_Entry.configure(background="white")473 self.Grand_Total_Entry.configure(disabledforeground="#a3a3a3")474 self.Grand_Total_Entry.configure(font="-family {Helvatica} -size 10")475 self.Grand_Total_Entry.configure(foreground="#000000")476 self.Grand_Total_Entry.configure(highlightbackground="#d9d9d9")477 self.Grand_Total_Entry.configure(highlightcolor="black")478 self.Grand_Total_Entry.configure(insertbackground="black")479 self.Grand_Total_Entry.configure(selectbackground="#c4c4c4")480 self.Grand_Total_Entry.configure(selectforeground="black")481 self.Oralpatho_Label = tk.Label(Turnover_Camp_Window)482 self.Oralpatho_Label.place(relx=0.335, rely=0.379, relwidth=0.162, relheight=0.05)483 self.Oralpatho_Label.configure(activebackground="#f9f9f9")484 self.Oralpatho_Label.configure(activeforeground="black")485 self.Oralpatho_Label.configure(background="#d9d9d9")486 self.Oralpatho_Label.configure(disabledforeground="#a3a3a3")487 self.Oralpatho_Label.configure(font="-family {Helvatica} -size 13 -weight normal")488 self.Oralpatho_Label.configure(foreground="#000000")489 self.Oralpatho_Label.configure(highlightbackground="#d9d9d9")490 self.Oralpatho_Label.configure(highlightcolor="black")491 self.Oralpatho_Label.configure(text='''Oralpatho''')492 self.Public_Health_Label = tk.Label(Turnover_Camp_Window)493 self.Public_Health_Label.place(relx=0.335, rely=0.447, relwidth=0.162, relheight=0.05)494 self.Public_Health_Label.configure(activebackground="#f9f9f9")495 self.Public_Health_Label.configure(activeforeground="black")496 self.Public_Health_Label.configure(background="#d9d9d9")497 self.Public_Health_Label.configure(disabledforeground="#a3a3a3")498 self.Public_Health_Label.configure(font="-family {Helvatica} -size 13 -weight normal")499 self.Public_Health_Label.configure(foreground="#000000")500 self.Public_Health_Label.configure(highlightbackground="#d9d9d9")501 self.Public_Health_Label.configure(highlightcolor="black")502 self.Public_Health_Label.configure(text='''Public Health''')503 self.Oral_Mea_Label = tk.Label(Turnover_Camp_Window)504 self.Oral_Mea_Label.place(relx=0.335, rely=0.514, relwidth=0.162, relheight=0.05)505 self.Oral_Mea_Label.configure(activebackground="#f9f9f9")506 self.Oral_Mea_Label.configure(activeforeground="black")507 self.Oral_Mea_Label.configure(background="#d9d9d9")508 self.Oral_Mea_Label.configure(disabledforeground="#a3a3a3")509 self.Oral_Mea_Label.configure(font="-family {Helvatica} -size 13 -weight normal")510 self.Oral_Mea_Label.configure(foreground="#000000")511 self.Oral_Mea_Label.configure(highlightbackground="#d9d9d9")512 self.Oral_Mea_Label.configure(highlightcolor="black")513 self.Oral_Mea_Label.configure(text='''Oral mea''')514 self.Prostho_Label = tk.Label(Turnover_Camp_Window)515 self.Prostho_Label.place(relx=0.335, rely=0.582, relwidth=0.162, relheight=0.05)516 self.Prostho_Label.configure(activebackground="#f9f9f9")517 self.Prostho_Label.configure(activeforeground="black")518 self.Prostho_Label.configure(background="#d9d9d9")519 self.Prostho_Label.configure(disabledforeground="#a3a3a3")520 self.Prostho_Label.configure(font="-family {Helvatica} -size 13 -weight normal")521 self.Prostho_Label.configure(foreground="#000000")522 self.Prostho_Label.configure(highlightbackground="#d9d9d9")523 self.Prostho_Label.configure(highlightcolor="black")524 self.Prostho_Label.configure(text='''Prostho ''')525 self.Grand_Total_Label = tk.Label(Turnover_Camp_Window)526 self.Grand_Total_Label.place(relx=0.335, rely=0.65, relwidth=0.162, relheight=0.05)527 self.Grand_Total_Label.configure(activebackground="#f9f9f9")528 self.Grand_Total_Label.configure(activeforeground="black")529 self.Grand_Total_Label.configure(background="#d9d9d9")530 self.Grand_Total_Label.configure(disabledforeground="#a3a3a3")531 self.Grand_Total_Label.configure(font="-family {Helvatica} -size 13 -weight normal")532 self.Grand_Total_Label.configure(foreground="#000000")533 self.Grand_Total_Label.configure(highlightbackground="#d9d9d9")534 self.Grand_Total_Label.configure(highlightcolor="black")535 self.Grand_Total_Label.configure(text='''Grand Total''')536 self.Add_Button_ = tk.Button(Turnover_Camp_Window)537 self.Add_Button_.place(relx=0.798, rely=0.311, relwidth=0.078, relheight=0.06)538 self.Add_Button_.configure(activebackground="#ececec")539 self.Add_Button_.configure(activeforeground="#000000")540 self.Add_Button_.configure(background="#d9d9d9")541 self.Add_Button_.configure(disabledforeground="#a3a3a3")542 self.Add_Button_.configure(font="-family {Helvatica} -size 13 -weight normal")543 self.Add_Button_.configure(foreground="#000000")544 self.Add_Button_.configure(highlightbackground="#d9d9d9")545 self.Add_Button_.configure(highlightcolor="black")546 self.Add_Button_.configure(pady="0")547 self.Add_Button_.configure(text='''ADD''', command=self.add_item)548 self.Delete_Button = tk.Button(Turnover_Camp_Window)549 self.Delete_Button.place(relx=0.798, rely=0.392, relwidth=0.078, relheight=0.06)550 self.Delete_Button.configure(activebackground="#ececec")551 self.Delete_Button.configure(activeforeground="#000000")552 self.Delete_Button.configure(background="#d9d9d9")553 self.Delete_Button.configure(disabledforeground="#a3a3a3")554 self.Delete_Button.configure(font="-family {Helvatica} -size 13 -weight normal")555 self.Delete_Button.configure(foreground="#000000")556 self.Delete_Button.configure(highlightbackground="#d9d9d9")557 self.Delete_Button.configure(highlightcolor="black")558 self.Delete_Button.configure(pady="0")559 self.Delete_Button.configure(text='''DELETE''', command=self.remove_item)560 self.Update_Button = tk.Button(Turnover_Camp_Window)561 self.Update_Button.place(relx=0.798, rely=0.474, relwidth=0.078, relheight=0.06)562 self.Update_Button.configure(activebackground="#ececec")563 self.Update_Button.configure(activeforeground="#000000")564 self.Update_Button.configure(background="#d9d9d9")565 self.Update_Button.configure(disabledforeground="#a3a3a3")566 self.Update_Button.configure(font="-family {Helvatica} -size 13 -weight normal")567 self.Update_Button.configure(foreground="#000000")568 self.Update_Button.configure(highlightbackground="#d9d9d9")569 self.Update_Button.configure(highlightcolor="black")570 self.Update_Button.configure(pady="0")571 self.Update_Button.configure(text='''UPDATE''', command=self.update_item)572 self.Clear_Button = tk.Button(Turnover_Camp_Window)573 self.Clear_Button.place(relx=0.798, rely=0.555, relwidth=0.078, relheight=0.06)574 self.Clear_Button.configure(activebackground="#ececec")575 self.Clear_Button.configure(activeforeground="#000000")576 self.Clear_Button.configure(background="#d9d9d9")577 self.Clear_Button.configure(disabledforeground="#a3a3a3")578 self.Clear_Button.configure(font="-family {Helvatica} -size 13 -weight normal")579 self.Clear_Button.configure(foreground="#000000")580 self.Clear_Button.configure(highlightbackground="#d9d9d9")581 self.Clear_Button.configure(highlightcolor="black")582 self.Clear_Button.configure(pady="0")583 self.Clear_Button.configure(text='''CLEAR''', command=self.clear_text)584 self.Scrolledlistbox1 = ScrolledListBox(Turnover_Camp_Window)585 self.Scrolledlistbox1.place(relx=0.02, rely=0.717, relheight=0.253586 , relwidth=0.969)587 self.Scrolledlistbox1.configure(background="white")588 self.Scrolledlistbox1.configure(disabledforeground="#a3a3a3")589 self.Scrolledlistbox1.configure(font=font10)590 self.Scrolledlistbox1.configure(foreground="black")591 self.Scrolledlistbox1.configure(highlightbackground="#d9d9d9")592 self.Scrolledlistbox1.configure(highlightcolor="#d9d9d9")593 self.Scrolledlistbox1.configure(selectbackground="#c4c4c4")594 self.Scrolledlistbox1.configure(selectforeground="black")595 self.tr_radio = tk.IntVar(None, 1)596 self.Screened_Radio = tk.Radiobutton(Turnover_Camp_Window)597 self.Screened_Radio.place(relx=0.013, rely=0.257, relheight=0.042598 , relwidth=0.18)599 self.Screened_Radio.configure(activebackground="#ececec")600 self.Screened_Radio.configure(activeforeground="#000000")601 self.Screened_Radio.configure(background="#d9d9d9")602 self.Screened_Radio.configure(disabledforeground="#a3a3a3")603 self.Screened_Radio.configure(font=font11)604 self.Screened_Radio.configure(foreground="#000000")605 self.Screened_Radio.configure(highlightbackground="#d9d9d9")606 self.Screened_Radio.configure(highlightcolor="black")607 self.Screened_Radio.configure(justify='left')608 self.Screened_Radio.configure(text='''Screened''')609 self.Screened_Radio.configure(value=1)610 self.Screened_Radio.configure(variable=self.tr_radio)611 self.Treated_Radio = tk.Radiobutton(Turnover_Camp_Window)612 self.Treated_Radio.place(relx=0.208, rely=0.257, relheight=0.042613 , relwidth=0.18)614 self.Treated_Radio.configure(activebackground="#ececec")615 self.Treated_Radio.configure(activeforeground="#000000")616 self.Treated_Radio.configure(background="#d9d9d9")617 self.Treated_Radio.configure(disabledforeground="#a3a3a3")618 self.Treated_Radio.configure(font=font11)619 self.Treated_Radio.configure(foreground="#000000")620 self.Treated_Radio.configure(highlightbackground="#d9d9d9")621 self.Treated_Radio.configure(highlightcolor="black")622 self.Treated_Radio.configure(justify='left')623 self.Treated_Radio.configure(text='''Treated''')624 self.Treated_Radio.configure(value=2)625 self.Treated_Radio.configure(variable=self.tr_radio)626 self.Reffered_Radio = tk.Radiobutton(Turnover_Camp_Window)627 self.Reffered_Radio.place(relx=0.408, rely=0.257, relheight=0.042628 , relwidth=0.18)629 self.Reffered_Radio.configure(activebackground="#ececec")630 self.Reffered_Radio.configure(activeforeground="#000000")631 self.Reffered_Radio.configure(background="#d9d9d9")632 self.Reffered_Radio.configure(disabledforeground="#a3a3a3")633 self.Reffered_Radio.configure(font=font11)634 self.Reffered_Radio.configure(foreground="#000000")635 self.Reffered_Radio.configure(highlightbackground="#d9d9d9")636 self.Reffered_Radio.configure(highlightcolor="black")637 self.Reffered_Radio.configure(justify='left')638 self.Reffered_Radio.configure(text='''Reffered''')639 self.Reffered_Radio.configure(value=3)640 self.Reffered_Radio.configure(variable=self.tr_radio)641 # Returns the list of all the entries in the window642 def get_entry_object(self):643 entries = [644 self.Date_Entry,645 self.From_Entry,646 self.To_Entry,647 self.Place_Entry,648 self.Address_Entry,649 self.Organiser_Entry,650 self.OPhone_Entry,651 self.Incharge_Entry,652 self.IPhone_Entry,653 self.Endodontics_Entry,654 self.Periodont_Entry,655 self.Orthodontics_Entry,656 self.Surgery_Entry,657 self.Pedodont_Entry,658 self.Oralpatho_Entry,659 self.Public_Health_Entry,660 self.Oral_Mea_Entry,661 self.Prostho_Entry,662 self.tr_radio,663 self.Grand_Total_Entry664 ]665 return entries666 667 # Adds a row to the database' respective table by getting inputs from entries668 def add_item(self):669 # Getting the values entered in each Entry box objects670 entries = self.get_entry_object()671 for i in range(0,len(entries)):672 entries[i] = entries[i].get()673 self.data.insert("turnover", entries)674 self.clear_text()675 self.populate_list()676 print("1 row added")677 # Clears all the data entered in the entries678 def clear_text(self):679 entries = self.get_entry_object()680 for i in range(0,len(entries)):681 try:682 entries[i].delete(0, tk.END)683 except AttributeError:684 pass685 686 # Returns the item selected in the listbox687 def select_item(self):688 index = self.Scrolledlistbox1.curselection()[0]689 selected_item = self.Scrolledlistbox1.get(index)690 return selected_item691 # Removes the item selected in the listbox692 def remove_item(self):693 selected = self.select_item()694 self.data.remove("turnover", selected[0])695 self.populate_list()696 print("Selected Item deleted")697 # Updates the item selected in list box with the values entered in Entry boxes698 def update_item(self):699 selected = self.select_item()700 values = self.get_entry_object()701 # id of new_values is as same as the old value702 new_values = [selected[0]]703 for val in values[1:]:704 new_values.append(val.get())705 self.data.update("turnover", new_values)706 self.clear_text()707 self.populate_list()708 print("Selected Item Updated")709 # Updates the list box with the current content of the table710 def populate_list(self):711 self.Scrolledlistbox1.delete(0,tk.END)712 for row in self.data.fetch("turnover"):713 self.Scrolledlistbox1.insert(tk.END,row)714 self.count = self.data.get_count("turnover")715# The following code is added to facilitate the Scrolled widgets you specified.716class AutoScroll(object):717 '''Configure the scrollbars for a widget.'''718 def __init__(self, master):719 # Rozen. Added the try-except clauses so that this class720 # could be used for scrolled entry widget for which vertical721 # scrolling is not supported. 5/7/14.722 try:723 vsb = ttk.Scrollbar(master, orient='vertical', command=self.yview)724 except:725 pass726 hsb = ttk.Scrollbar(master, orient='horizontal', command=self.xview)727 # self.configure(yscrollcommand=_autoscroll(vsb),728 # xscrollcommand=_autoscroll(hsb))729 try:730 self.configure(yscrollcommand=self._autoscroll(vsb))731 except:732 pass733 self.configure(xscrollcommand=self._autoscroll(hsb))734 self.grid(column=0, row=0, sticky='nsew')735 try:736 vsb.grid(column=1, row=0, sticky='ns')737 except:738 pass739 hsb.grid(column=0, row=1, sticky='ew')740 master.grid_columnconfigure(0, weight=1)741 master.grid_rowconfigure(0, weight=1)742 # Copy geometry methods of master (taken from ScrolledText.py)743 if py3:744 methods = tk.Pack.__dict__.keys() | tk.Grid.__dict__.keys() \745 | tk.Place.__dict__.keys()746 else:747 methods = tk.Pack.__dict__.keys() + tk.Grid.__dict__.keys() \748 + tk.Place.__dict__.keys()749 for meth in methods:750 if meth[0] != '_' and meth not in ('config', 'configure'):751 setattr(self, meth, getattr(master, meth))752 @staticmethod753 def _autoscroll(sbar):754 '''Hide and show scrollbar as needed.'''755 def wrapped(first, last):...
satelite_window.py
Source:satelite_window.py
...60 Satellite_Window.minsize(148, 1)61 Satellite_Window.maxsize(4112, 1055)62 Satellite_Window.resizable(1, 1)63 Satellite_Window.title("SATELLITE CENTRES")64 Satellite_Window.configure(background="#40b3a2")65 self.data = Database("dental.db")66 self.style = ttk.Style()67 if sys.platform == "win32":68 self.style.theme_use('winnative')69 self.style.configure('.', background=_bgcolor)70 self.style.configure('.', foreground=_fgcolor)71 self.style.map('.', background=72 [('selected', _compcolor), ('active', _ana2color)])73 self.menubar = tk.Menu(Satellite_Window, font=font9, bg=_bgcolor, fg=_fgcolor)74 Satellite_Window.configure(menu=self.menubar)75 self.File = tk.Menu(Satellite_Window, tearoff=0)76 self.menubar.add_cascade(menu=self.File,77 activebackground="#ececec",78 activeforeground="#000000",79 background="#d9d9d9",80 font=(81 '-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),82 foreground="#000000",83 label="File")84 self.File.add_command(85 activebackground="#ececec",86 activeforeground="#000000",87 background="#d9d9d9",88 font=('-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),89 foreground="#000000",90 label="Exit",91 command=satelite_window_support.destroy_window)92 self.Department_Label = tk.Label(Satellite_Window)93 self.Department_Label.place(relx=0.201, rely=0.027, relwidth=0.518, relheight=0.084)94 self.Department_Label.configure(activebackground="#f9f9f9")95 self.Department_Label.configure(activeforeground="black")96 self.Department_Label.configure(background="#d9d9d9")97 self.Department_Label.configure(disabledforeground="#a3a3a3")98 self.Department_Label.configure(font="-family {Helvatica} -size 18 -weight normal")99 self.Department_Label.configure(foreground="#000000")100 self.Department_Label.configure(highlightbackground="#d9d9d9")101 self.Department_Label.configure(highlightcolor="black")102 self.Department_Label.configure(relief="raised")103 self.Department_Label.configure(text='''Satellite Centre Out Patient''')104 self.Incharge_Label = tk.Label(Satellite_Window)105 self.Incharge_Label.place(relx=0.013, rely=0.189, relwidth=0.169, relheight=0.05)106 self.Incharge_Label.configure(activebackground="#f9f9f9")107 self.Incharge_Label.configure(activeforeground="black")108 self.Incharge_Label.configure(background="#d9d9d9")109 self.Incharge_Label.configure(disabledforeground="#a3a3a3")110 self.Incharge_Label.configure(font="-family {Helvatica} -size 13 -weight normal")111 self.Incharge_Label.configure(foreground="#000000")112 self.Incharge_Label.configure(highlightbackground="#d9d9d9")113 self.Incharge_Label.configure(highlightcolor="black")114 self.Incharge_Label.configure(text='''Incharge''')115 self.Incharge_Entry = tk.Entry(Satellite_Window)116 self.Incharge_Entry.place(relx=0.188, rely=0.189, relheight=0.048117 , relwidth=0.137)118 self.Incharge_Entry.configure(background="white")119 self.Incharge_Entry.configure(disabledforeground="#a3a3a3")120 self.Incharge_Entry.configure(font="-family {Helvatica} -size 10")121 self.Incharge_Entry.configure(foreground="#000000")122 self.Incharge_Entry.configure(highlightbackground="#d9d9d9")123 self.Incharge_Entry.configure(highlightcolor="black")124 self.Incharge_Entry.configure(insertbackground="black")125 self.Incharge_Entry.configure(selectbackground="#c4c4c4")126 self.Incharge_Entry.configure(selectforeground="black")127 self.Phone_Label = tk.Label(Satellite_Window)128 self.Phone_Label.place(relx=0.335, rely=0.189, relwidth=0.162, relheight=0.05)129 self.Phone_Label.configure(activebackground="#f9f9f9")130 self.Phone_Label.configure(activeforeground="black")131 self.Phone_Label.configure(background="#d9d9d9")132 self.Phone_Label.configure(disabledforeground="#a3a3a3")133 self.Phone_Label.configure(font="-family {Helvatica} -size 13 -weight normal")134 self.Phone_Label.configure(foreground="#000000")135 self.Phone_Label.configure(highlightbackground="#d9d9d9")136 self.Phone_Label.configure(highlightcolor="black")137 self.Phone_Label.configure(text='''Phone''')138 self.Phone_Entry = tk.Entry(Satellite_Window)139 self.Phone_Entry.place(relx=0.51, rely=0.189, relheight=0.048, relwidth=0.137)140 self.Phone_Entry.configure(background="white")141 self.Phone_Entry.configure(disabledforeground="#a3a3a3")142 self.Phone_Entry.configure(font="-family {Helvatica} -size 10")143 self.Phone_Entry.configure(foreground="#000000")144 self.Phone_Entry.configure(highlightbackground="#d9d9d9")145 self.Phone_Entry.configure(highlightcolor="black")146 self.Phone_Entry.configure(insertbackground="black")147 self.Phone_Entry.configure(selectbackground="#c4c4c4")148 self.Phone_Entry.configure(selectforeground="black")149 self.Date_Label = tk.Label(Satellite_Window)150 self.Date_Label.place(relx=0.664, rely=0.189, relwidth=0.122, relheight=0.05)151 self.Date_Label.configure(activebackground="#f9f9f9")152 self.Date_Label.configure(activeforeground="black")153 self.Date_Label.configure(background="#d9d9d9")154 self.Date_Label.configure(disabledforeground="#a3a3a3")155 self.Date_Label.configure(font="-family {Helvatica} -size 13 -weight normal")156 self.Date_Label.configure(foreground="#000000")157 self.Date_Label.configure(highlightbackground="#d9d9d9")158 self.Date_Label.configure(highlightcolor="black")159 self.Date_Label.configure(text='''Date\nYYYY-MM-DD''')160 now = datetime.datetime.now()161 self.Date_Entry = DateEntry(Satellite_Window, year=now.year, month=now.month, day=now.day)162 self.Date_Entry.place(relx=0.791, rely=0.189, relheight=0.048, relwidth=0.137)163 self.Date_Entry.configure(background="white")164 self.Date_Entry.configure(date_pattern='y/mm/dd')165 self.Date_Entry.configure(font="-family {Helvetica} -size 10")166 self.Date_Entry.configure(foreground="#000000")167 self.Date_Entry.configure(borderwidth=2)168 self.Date_Entry.configure(width=12)169 # self.Date_Entry = tk.Entry(Satellite_Window)170 # self.Date_Entry.place(relx=0.791, rely=0.189, relheight=0.048, relwidth=0.137)171 # self.Date_Entry.configure(background="white")172 # self.Date_Entry.configure(disabledforeground="#a3a3a3")173 # self.Date_Entry.configure(font="-family {Helvatica} -size 10")174 # self.Date_Entry.configure(foreground="#000000")175 # self.Date_Entry.configure(highlightbackground="#d9d9d9")176 # self.Date_Entry.configure(highlightcolor="black")177 # self.Date_Entry.configure(insertbackground="black")178 # self.Date_Entry.configure(selectbackground="#c4c4c4")179 # self.Date_Entry.configure(selectforeground="black")180 self.From_Label = tk.Label(Satellite_Window)181 self.From_Label.place(relx=0.013, rely=0.311, relwidth=0.162, relheight=0.05)182 self.From_Label.configure(activebackground="#f9f9f9")183 self.From_Label.configure(activeforeground="black")184 self.From_Label.configure(background="#d9d9d9")185 self.From_Label.configure(disabledforeground="#a3a3a3")186 self.From_Label.configure(font="-family {Helvatica} -size 13 -weight normal")187 self.From_Label.configure(foreground="#000000")188 self.From_Label.configure(highlightbackground="#d9d9d9")189 self.From_Label.configure(highlightcolor="black")190 self.From_Label.configure(text='''ID From''')191 self.From_Entry = tk.Entry(Satellite_Window)192 self.From_Entry.place(relx=0.188, rely=0.311, relwidth=0.137, relheight=0.048)193 self.From_Entry.configure(background="white")194 self.From_Entry.configure(disabledforeground="#a3a3a3")195 self.From_Entry.configure(font="-family {Helvatica} -size 10")196 self.From_Entry.configure(foreground="#000000")197 self.From_Entry.configure(highlightbackground="#d9d9d9")198 self.From_Entry.configure(highlightcolor="black")199 self.From_Entry.configure(insertbackground="black")200 self.From_Entry.configure(selectbackground="#c4c4c4")201 self.From_Entry.configure(selectforeground="black")202 self.To_Label = tk.Label(Satellite_Window)203 self.To_Label.place(relx=0.335, rely=0.311, relwidth=0.162, relheight=0.05)204 self.To_Label.configure(activebackground="#f9f9f9")205 self.To_Label.configure(activeforeground="black")206 self.To_Label.configure(background="#d9d9d9")207 self.To_Label.configure(disabledforeground="#a3a3a3")208 self.To_Label.configure(font="-family {Helvatica} -size 13 -weight normal")209 self.To_Label.configure(foreground="#000000")210 self.To_Label.configure(highlightbackground="#d9d9d9")211 self.To_Label.configure(highlightcolor="black")212 self.To_Label.configure(text='''ID To''')213 self.To_Entry = tk.Entry(Satellite_Window)214 self.To_Entry.place(relx=0.51, rely=0.311, relwidth=0.137, relheight=0.048)215 self.To_Entry.configure(background="white")216 self.To_Entry.configure(disabledforeground="#a3a3a3")217 self.To_Entry.configure(font="-family {Helvatica} -size 10")218 self.To_Entry.configure(foreground="#000000")219 self.To_Entry.configure(highlightbackground="#d9d9d9")220 self.To_Entry.configure(highlightcolor="black")221 self.To_Entry.configure(insertbackground="black")222 self.To_Entry.configure(selectbackground="#c4c4c4")223 self.To_Entry.configure(selectforeground="black")224 self.Endodontics_Label = tk.Label(Satellite_Window)225 self.Endodontics_Label.place(relx=0.013, rely=0.379, relwidth=0.162, relheight=0.05)226 self.Endodontics_Label.configure(activebackground="#f9f9f9")227 self.Endodontics_Label.configure(activeforeground="black")228 self.Endodontics_Label.configure(background="#d9d9d9")229 self.Endodontics_Label.configure(disabledforeground="#a3a3a3")230 self.Endodontics_Label.configure(font="-family {Helvatica} -size 13 -weight normal")231 self.Endodontics_Label.configure(foreground="#000000")232 self.Endodontics_Label.configure(highlightbackground="#d9d9d9")233 self.Endodontics_Label.configure(highlightcolor="black")234 self.Endodontics_Label.configure(text='''Endodontics''')235 self.Periodont_Label = tk.Label(Satellite_Window)236 self.Periodont_Label.place(relx=0.013, rely=0.447, relwidth=0.162, relheight=0.05)237 self.Periodont_Label.configure(activebackground="#f9f9f9")238 self.Periodont_Label.configure(activeforeground="black")239 self.Periodont_Label.configure(background="#d9d9d9")240 self.Periodont_Label.configure(disabledforeground="#a3a3a3")241 self.Periodont_Label.configure(font="-family {Helvatica} -size 13 -weight normal")242 self.Periodont_Label.configure(foreground="#000000")243 self.Periodont_Label.configure(highlightbackground="#d9d9d9")244 self.Periodont_Label.configure(highlightcolor="black")245 self.Periodont_Label.configure(text='''Periodont''')246 self.Orthodontics_Label = tk.Label(Satellite_Window)247 self.Orthodontics_Label.place(relx=0.013, rely=0.514, relwidth=0.162, relheight=0.05)248 self.Orthodontics_Label.configure(activebackground="#f9f9f9")249 self.Orthodontics_Label.configure(activeforeground="black")250 self.Orthodontics_Label.configure(background="#d9d9d9")251 self.Orthodontics_Label.configure(disabledforeground="#a3a3a3")252 self.Orthodontics_Label.configure(font="-family {Helvatica} -size 13 -weight normal")253 self.Orthodontics_Label.configure(foreground="#000000")254 self.Orthodontics_Label.configure(highlightbackground="#d9d9d9")255 self.Orthodontics_Label.configure(highlightcolor="black")256 self.Orthodontics_Label.configure(text='''Orthodontics''')257 self.Surgery_Label = tk.Label(Satellite_Window)258 self.Surgery_Label.place(relx=0.013, rely=0.582, relwidth=0.162, relheight=0.05)259 self.Surgery_Label.configure(activebackground="#f9f9f9")260 self.Surgery_Label.configure(activeforeground="black")261 self.Surgery_Label.configure(background="#d9d9d9")262 self.Surgery_Label.configure(disabledforeground="#a3a3a3")263 self.Surgery_Label.configure(font="-family {Helvatica} -size 13 -weight normal")264 self.Surgery_Label.configure(foreground="#000000")265 self.Surgery_Label.configure(highlightbackground="#d9d9d9")266 self.Surgery_Label.configure(highlightcolor="black")267 self.Surgery_Label.configure(text='''Surgery''')268 self.Pedodont_Label = tk.Label(Satellite_Window)269 self.Pedodont_Label.place(relx=0.013, rely=0.65, relwidth=0.162, relheight=0.05)270 self.Pedodont_Label.configure(activebackground="#f9f9f9")271 self.Pedodont_Label.configure(activeforeground="black")272 self.Pedodont_Label.configure(background="#d9d9d9")273 self.Pedodont_Label.configure(disabledforeground="#a3a3a3")274 self.Pedodont_Label.configure(font="-family {Helvatica} -size 13 -weight normal")275 self.Pedodont_Label.configure(foreground="#000000")276 self.Pedodont_Label.configure(highlightbackground="#d9d9d9")277 self.Pedodont_Label.configure(highlightcolor="black")278 self.Pedodont_Label.configure(text='''Pedodont''')279 self.Oralpatho_Label = tk.Label(Satellite_Window)280 self.Oralpatho_Label.place(relx=0.335, rely=0.379, relwidth=0.162, relheight=0.05)281 self.Oralpatho_Label.configure(activebackground="#f9f9f9")282 self.Oralpatho_Label.configure(activeforeground="black")283 self.Oralpatho_Label.configure(background="#d9d9d9")284 self.Oralpatho_Label.configure(disabledforeground="#a3a3a3")285 self.Oralpatho_Label.configure(font="-family {Helvatica} -size 13 -weight normal")286 self.Oralpatho_Label.configure(foreground="#000000")287 self.Oralpatho_Label.configure(highlightbackground="#d9d9d9")288 self.Oralpatho_Label.configure(highlightcolor="black")289 self.Oralpatho_Label.configure(text='''Oralpatho''')290 self.Public_Health_Label = tk.Label(Satellite_Window)291 self.Public_Health_Label.place(relx=0.335, rely=0.447, relwidth=0.162, relheight=0.05)292 self.Public_Health_Label.configure(activebackground="#f9f9f9")293 self.Public_Health_Label.configure(activeforeground="black")294 self.Public_Health_Label.configure(background="#d9d9d9")295 self.Public_Health_Label.configure(disabledforeground="#a3a3a3")296 self.Public_Health_Label.configure(font="-family {Helvatica} -size 13 -weight normal")297 self.Public_Health_Label.configure(foreground="#000000")298 self.Public_Health_Label.configure(highlightbackground="#d9d9d9")299 self.Public_Health_Label.configure(highlightcolor="black")300 self.Public_Health_Label.configure(text='''Public Health''')301 self.Oral_Mea_Label = tk.Label(Satellite_Window)302 self.Oral_Mea_Label.place(relx=0.335, rely=0.514, relwidth=0.162, relheight=0.05)303 self.Oral_Mea_Label.configure(activebackground="#f9f9f9")304 self.Oral_Mea_Label.configure(activeforeground="black")305 self.Oral_Mea_Label.configure(background="#d9d9d9")306 self.Oral_Mea_Label.configure(disabledforeground="#a3a3a3")307 self.Oral_Mea_Label.configure(font="-family {Helvatica} -size 13 -weight normal")308 self.Oral_Mea_Label.configure(foreground="#000000")309 self.Oral_Mea_Label.configure(highlightbackground="#d9d9d9")310 self.Oral_Mea_Label.configure(highlightcolor="black")311 self.Oral_Mea_Label.configure(text='''Oral mea''')312 self.Prostho_Label = tk.Label(Satellite_Window)313 self.Prostho_Label.place(relx=0.335, rely=0.582, relwidth=0.162, relheight=0.05)314 self.Prostho_Label.configure(activebackground="#f9f9f9")315 self.Prostho_Label.configure(activeforeground="black")316 self.Prostho_Label.configure(background="#d9d9d9")317 self.Prostho_Label.configure(disabledforeground="#a3a3a3")318 self.Prostho_Label.configure(font="-family {Helvatica} -size 13 -weight normal")319 self.Prostho_Label.configure(foreground="#000000")320 self.Prostho_Label.configure(highlightbackground="#d9d9d9")321 self.Prostho_Label.configure(highlightcolor="black")322 self.Prostho_Label.configure(text='''Prostho''')323 self.Grand_Total_Label = tk.Label(Satellite_Window)324 self.Grand_Total_Label.place(relx=0.335, rely=0.65, relwidth=0.162, relheight=0.05)325 self.Grand_Total_Label.configure(activebackground="#f9f9f9")326 self.Grand_Total_Label.configure(activeforeground="black")327 self.Grand_Total_Label.configure(background="#d9d9d9")328 self.Grand_Total_Label.configure(disabledforeground="#a3a3a3")329 self.Grand_Total_Label.configure(font="-family {Helvatica} -size 13 -weight normal")330 self.Grand_Total_Label.configure(foreground="#000000")331 self.Grand_Total_Label.configure(highlightbackground="#d9d9d9")332 self.Grand_Total_Label.configure(highlightcolor="black")333 self.Grand_Total_Label.configure(text='''Grand Total''')334 # Defining the entries335 self.Endodontics_Entry = tk.Entry(Satellite_Window)336 self.Endodontics_Entry.place(relx=0.188, rely=0.379, relwidth=0.137, relheight=0.048)337 self.Endodontics_Entry.configure(background="white")338 self.Endodontics_Entry.configure(disabledforeground="#a3a3a3")339 self.Endodontics_Entry.configure(font="-family {Helvatica} -size 10")340 self.Endodontics_Entry.configure(foreground="#000000")341 self.Endodontics_Entry.configure(highlightbackground="#d9d9d9")342 self.Endodontics_Entry.configure(highlightcolor="black")343 self.Endodontics_Entry.configure(insertbackground="black")344 self.Endodontics_Entry.configure(selectbackground="#c4c4c4")345 self.Endodontics_Entry.configure(selectforeground="black")346 self.Periodont_Entry = tk.Entry(Satellite_Window)347 self.Periodont_Entry.place(relx=0.188, rely=0.447, relwidth=0.137, relheight=0.048)348 self.Periodont_Entry.configure(background="white")349 self.Periodont_Entry.configure(disabledforeground="#a3a3a3")350 self.Periodont_Entry.configure(font="-family {Helvatica} -size 10")351 self.Periodont_Entry.configure(foreground="#000000")352 self.Periodont_Entry.configure(highlightbackground="#d9d9d9")353 self.Periodont_Entry.configure(highlightcolor="black")354 self.Periodont_Entry.configure(insertbackground="black")355 self.Periodont_Entry.configure(selectbackground="#c4c4c4")356 self.Periodont_Entry.configure(selectforeground="black")357 self.Orthodontics_Entry = tk.Entry(Satellite_Window)358 self.Orthodontics_Entry.place(relx=0.188, rely=0.514, relwidth=0.137, relheight=0.048)359 self.Orthodontics_Entry.configure(background="white")360 self.Orthodontics_Entry.configure(disabledforeground="#a3a3a3")361 self.Orthodontics_Entry.configure(font="-family {Helvatica} -size 10")362 self.Orthodontics_Entry.configure(foreground="#000000")363 self.Orthodontics_Entry.configure(highlightbackground="#d9d9d9")364 self.Orthodontics_Entry.configure(highlightcolor="black")365 self.Orthodontics_Entry.configure(insertbackground="black")366 self.Orthodontics_Entry.configure(selectbackground="#c4c4c4")367 self.Orthodontics_Entry.configure(selectforeground="black")368 self.Surgery_Entry = tk.Entry(Satellite_Window)369 self.Surgery_Entry.place(relx=0.188, rely=0.582, relwidth=0.137, relheight=0.048)370 self.Surgery_Entry.configure(background="white")371 self.Surgery_Entry.configure(disabledforeground="#a3a3a3")372 self.Surgery_Entry.configure(font="-family {Helvatica} -size 10")373 self.Surgery_Entry.configure(foreground="#000000")374 self.Surgery_Entry.configure(highlightbackground="#d9d9d9")375 self.Surgery_Entry.configure(highlightcolor="black")376 self.Surgery_Entry.configure(insertbackground="black")377 self.Surgery_Entry.configure(selectbackground="#c4c4c4")378 self.Surgery_Entry.configure(selectforeground="black")379 self.Pedodont_Entry = tk.Entry(Satellite_Window)380 self.Pedodont_Entry.place(relx=0.188, rely=0.65, relwidth=0.137, relheight=0.048)381 self.Pedodont_Entry.configure(background="white")382 self.Pedodont_Entry.configure(disabledforeground="#a3a3a3")383 self.Pedodont_Entry.configure(font="-family {Helvatica} -size 10")384 self.Pedodont_Entry.configure(foreground="#000000")385 self.Pedodont_Entry.configure(highlightbackground="#d9d9d9")386 self.Pedodont_Entry.configure(highlightcolor="black")387 self.Pedodont_Entry.configure(insertbackground="black")388 self.Pedodont_Entry.configure(selectbackground="#c4c4c4")389 self.Pedodont_Entry.configure(selectforeground="black")390 self.Oralpatho_Entry = tk.Entry(Satellite_Window)391 self.Oralpatho_Entry.place(relx=0.51, rely=0.379, relwidth=0.137, relheight=0.048)392 self.Oralpatho_Entry.configure(background="white")393 self.Oralpatho_Entry.configure(disabledforeground="#a3a3a3")394 self.Oralpatho_Entry.configure(font="-family {Helvatica} -size 10")395 self.Oralpatho_Entry.configure(foreground="#000000")396 self.Oralpatho_Entry.configure(highlightbackground="#d9d9d9")397 self.Oralpatho_Entry.configure(highlightcolor="black")398 self.Oralpatho_Entry.configure(insertbackground="black")399 self.Oralpatho_Entry.configure(selectbackground="#c4c4c4")400 self.Oralpatho_Entry.configure(selectforeground="black")401 self.Public_Health_Entry = tk.Entry(Satellite_Window)402 self.Public_Health_Entry.place(relx=0.51, rely=0.447, relwidth=0.137, relheight=0.048)403 self.Public_Health_Entry.configure(background="white")404 self.Public_Health_Entry.configure(disabledforeground="#a3a3a3")405 self.Public_Health_Entry.configure(font="-family {Helvatica} -size 10")406 self.Public_Health_Entry.configure(foreground="#000000")407 self.Public_Health_Entry.configure(highlightbackground="#d9d9d9")408 self.Public_Health_Entry.configure(highlightcolor="black")409 self.Public_Health_Entry.configure(insertbackground="black")410 self.Public_Health_Entry.configure(selectbackground="#c4c4c4")411 self.Public_Health_Entry.configure(selectforeground="black")412 self.Oral_Mea_Entry = tk.Entry(Satellite_Window)413 self.Oral_Mea_Entry.place(relx=0.51, rely=0.514, relwidth=0.137, relheight=0.048)414 self.Oral_Mea_Entry.configure(background="white")415 self.Oral_Mea_Entry.configure(disabledforeground="#a3a3a3")416 self.Oral_Mea_Entry.configure(font="-family {Helvatica} -size 10")417 self.Oral_Mea_Entry.configure(foreground="#000000")418 self.Oral_Mea_Entry.configure(highlightbackground="#d9d9d9")419 self.Oral_Mea_Entry.configure(highlightcolor="black")420 self.Oral_Mea_Entry.configure(insertbackground="black")421 self.Oral_Mea_Entry.configure(selectbackground="#c4c4c4")422 self.Oral_Mea_Entry.configure(selectforeground="black")423 self.Prostho_Entry = tk.Entry(Satellite_Window)424 self.Prostho_Entry.place(relx=0.51, rely=0.582, relwidth=0.137, relheight=0.048)425 self.Prostho_Entry.configure(background="white")426 self.Prostho_Entry.configure(disabledforeground="#a3a3a3")427 self.Prostho_Entry.configure(font="-family {Helvatica} -size 10")428 self.Prostho_Entry.configure(foreground="#000000")429 self.Prostho_Entry.configure(highlightbackground="#d9d9d9")430 self.Prostho_Entry.configure(highlightcolor="black")431 self.Prostho_Entry.configure(insertbackground="black")432 self.Prostho_Entry.configure(selectbackground="#c4c4c4")433 self.Prostho_Entry.configure(selectforeground="black")434 self.Grand_Total_Entry = tk.Entry(Satellite_Window)435 self.Grand_Total_Entry.place(relx=0.51, rely=0.65, relwidth=0.137, relheight=0.048)436 self.Grand_Total_Entry.configure(background="white")437 self.Grand_Total_Entry.configure(disabledforeground="#a3a3a3")438 self.Grand_Total_Entry.configure(font="-family {Helvatica} -size 10")439 self.Grand_Total_Entry.configure(foreground="#000000")440 self.Grand_Total_Entry.configure(highlightbackground="#d9d9d9")441 self.Grand_Total_Entry.configure(highlightcolor="black")442 self.Grand_Total_Entry.configure(insertbackground="black")443 self.Grand_Total_Entry.configure(selectbackground="#c4c4c4")444 self.Grand_Total_Entry.configure(selectforeground="black")445 self.Add_Button_ = tk.Button(Satellite_Window)446 self.Add_Button_.place(relx=0.798, rely=0.311, relwidth=0.078, relheight=0.06)447 self.Add_Button_.configure(activebackground="#ececec")448 self.Add_Button_.configure(activeforeground="#000000")449 self.Add_Button_.configure(background="#d9d9d9")450 self.Add_Button_.configure(disabledforeground="#a3a3a3")451 self.Add_Button_.configure(font="-family {Helvatica} -size 13 -weight normal")452 self.Add_Button_.configure(foreground="#000000")453 self.Add_Button_.configure(highlightbackground="#d9d9d9")454 self.Add_Button_.configure(highlightcolor="black")455 self.Add_Button_.configure(pady="0")456 self.Add_Button_.configure(text='''ADD''', command=self.add_item)457 self.Delete_Button = tk.Button(Satellite_Window)458 self.Delete_Button.place(relx=0.798, rely=0.392, relwidth=0.078, relheight=0.06)459 self.Delete_Button.configure(activebackground="#ececec")460 self.Delete_Button.configure(activeforeground="#000000")461 self.Delete_Button.configure(background="#d9d9d9")462 self.Delete_Button.configure(disabledforeground="#a3a3a3")463 self.Delete_Button.configure(font="-family {Helvatica} -size 13 -weight normal")464 self.Delete_Button.configure(foreground="#000000")465 self.Delete_Button.configure(highlightbackground="#d9d9d9")466 self.Delete_Button.configure(highlightcolor="black")467 self.Delete_Button.configure(pady="0")468 self.Delete_Button.configure(text='''DELETE''', command=self.remove_item)469 self.Update_Button = tk.Button(Satellite_Window)470 self.Update_Button.place(relx=0.798, rely=0.474, relwidth=0.078, relheight=0.06)471 self.Update_Button.configure(activebackground="#ececec")472 self.Update_Button.configure(activeforeground="#000000")473 self.Update_Button.configure(background="#d9d9d9")474 self.Update_Button.configure(disabledforeground="#a3a3a3")475 self.Update_Button.configure(font="-family {Helvatica} -size 13 -weight normal")476 self.Update_Button.configure(foreground="#000000")477 self.Update_Button.configure(highlightbackground="#d9d9d9")478 self.Update_Button.configure(highlightcolor="black")479 self.Update_Button.configure(pady="0")480 self.Update_Button.configure(text='''UPDATE''', command=self.update_item)481 self.Clear_Button = tk.Button(Satellite_Window)482 self.Clear_Button.place(relx=0.798, rely=0.555, relwidth=0.078, relheight=0.06)483 self.Clear_Button.configure(activebackground="#ececec")484 self.Clear_Button.configure(activeforeground="#000000")485 self.Clear_Button.configure(background="#d9d9d9")486 self.Clear_Button.configure(disabledforeground="#a3a3a3")487 self.Clear_Button.configure(font="-family {Helvatica} -size 13 -weight normal")488 self.Clear_Button.configure(foreground="#000000")489 self.Clear_Button.configure(highlightbackground="#d9d9d9")490 self.Clear_Button.configure(highlightcolor="black")491 self.Clear_Button.configure(pady="0")492 self.Clear_Button.configure(text='''CLEAR''', command=self.clear_text)493 self.Scrolledlistbox3 = ScrolledListBox(Satellite_Window)494 self.Scrolledlistbox3.place(relx=0.02, rely=0.717, relheight=0.253495 , relwidth=0.969)496 self.Scrolledlistbox3.configure(background="white")497 self.Scrolledlistbox3.configure(disabledforeground="#a3a3a3")498 self.Scrolledlistbox3.configure(font=font10)499 self.Scrolledlistbox3.configure(foreground="black")500 self.Scrolledlistbox3.configure(highlightbackground="#d9d9d9")501 self.Scrolledlistbox3.configure(highlightcolor="#d9d9d9")502 self.Scrolledlistbox3.configure(selectbackground="#c4c4c4")503 self.Scrolledlistbox3.configure(selectforeground="black")504 self.center_radio = tk.IntVar(None, 1)505 # self.center_radio = department_window_support.var506 self.Centre1_Radio = tk.Radiobutton(Satellite_Window)507 self.Centre1_Radio.place(relx=0.013, rely=0.135, relheight=0.042508 , relwidth=0.18)509 self.Centre1_Radio.configure(activebackground="#ececec")510 self.Centre1_Radio.configure(activeforeground="#000000")511 self.Centre1_Radio.configure(background="#d9d9d9")512 self.Centre1_Radio.configure(disabledforeground="#a3a3a3")513 self.Centre1_Radio.configure(font=font14)514 self.Centre1_Radio.configure(foreground="#000000")515 self.Centre1_Radio.configure(highlightbackground="#d9d9d9")516 self.Centre1_Radio.configure(highlightcolor="black")517 self.Centre1_Radio.configure(justify='left')518 self.Centre1_Radio.configure(text='''Centre1''')519 self.Centre1_Radio.configure(value=1)520 self.Centre1_Radio.configure(variable=self.center_radio)521 self.Centre2_Radio = tk.Radiobutton(Satellite_Window)522 self.Centre2_Radio.place(relx=0.208, rely=0.135, relheight=0.042523 , relwidth=0.18)524 self.Centre2_Radio.configure(activebackground="#ececec")525 self.Centre2_Radio.configure(activeforeground="#000000")526 self.Centre2_Radio.configure(background="#d9d9d9")527 self.Centre2_Radio.configure(disabledforeground="#a3a3a3")528 self.Centre2_Radio.configure(font="-family {Helvatica} -size 13 -weight normal")529 self.Centre2_Radio.configure(foreground="#000000")530 self.Centre2_Radio.configure(highlightbackground="#d9d9d9")531 self.Centre2_Radio.configure(highlightcolor="black")532 self.Centre2_Radio.configure(justify='left')533 self.Centre2_Radio.configure(text='''Centre2''')534 self.Centre2_Radio.configure(value=2)535 self.Centre2_Radio.configure(variable=self.center_radio)536 self.Centre3_Radio = tk.Radiobutton(Satellite_Window)537 self.Centre3_Radio.place(relx=0.402, rely=0.135, relheight=0.042538 , relwidth=0.18)539 self.Centre3_Radio.configure(activebackground="#ececec",540 activeforeground="#000000",541 background="#d9d9d9",542 disabledforeground="#a3a3a3",543 font="-family {Helvatica} -size 13 -weight normal",544 foreground="#000000",545 highlightbackground="#d9d9d9",546 highlightcolor="black",547 justify='left',548 text='''Centre3''',549 value=3,550 variable=self.center_radio)551 self.Centre4_Radio = tk.Radiobutton(Satellite_Window)552 self.Centre4_Radio.place(relx=0.597, rely=0.135, relheight=0.042553 , relwidth=0.18)554 self.Centre4_Radio.configure(activebackground="#ececec")555 self.Centre4_Radio.configure(activeforeground="#000000")556 self.Centre4_Radio.configure(background="#d9d9d9")557 self.Centre4_Radio.configure(disabledforeground="#a3a3a3")558 self.Centre4_Radio.configure(font="-family {Helvatica} -size 13 -weight normal")559 self.Centre4_Radio.configure(foreground="#000000")560 self.Centre4_Radio.configure(highlightbackground="#d9d9d9")561 self.Centre4_Radio.configure(highlightcolor="black")562 self.Centre4_Radio.configure(justify='left')563 self.Centre4_Radio.configure(text='''Centre4''')564 self.Centre4_Radio.configure(value=4)565 self.Centre4_Radio.configure(variable=self.center_radio)566 self.tr_radio = tk.IntVar(None, 1)567 self.Treated_Radio = tk.Radiobutton(Satellite_Window)568 self.Treated_Radio.place(relx=0.013, rely=0.257, relheight=0.042569 , relwidth=0.18)570 self.Treated_Radio.configure(activebackground="#ececec")571 self.Treated_Radio.configure(activeforeground="#000000")572 self.Treated_Radio.configure(background="#d9d9d9")573 self.Treated_Radio.configure(disabledforeground="#a3a3a3")574 self.Treated_Radio.configure(font=font14)575 self.Treated_Radio.configure(foreground="#000000")576 self.Treated_Radio.configure(highlightbackground="#d9d9d9")577 self.Treated_Radio.configure(highlightcolor="black")578 self.Treated_Radio.configure(justify='left')579 self.Treated_Radio.configure(text='''Treated''')580 self.Treated_Radio.configure(value=1)581 self.Treated_Radio.configure(variable=self.tr_radio)582 self.Reffered_Radio = tk.Radiobutton(Satellite_Window)583 self.Reffered_Radio.place(relx=0.208, rely=0.257, relheight=0.042584 , relwidth=0.18)585 self.Reffered_Radio.configure(activebackground="#ececec")586 self.Reffered_Radio.configure(activeforeground="#000000")587 self.Reffered_Radio.configure(background="#d9d9d9")588 self.Reffered_Radio.configure(disabledforeground="#a3a3a3")589 self.Reffered_Radio.configure(font=font14)590 self.Reffered_Radio.configure(foreground="#000000")591 self.Reffered_Radio.configure(highlightbackground="#d9d9d9")592 self.Reffered_Radio.configure(highlightcolor="black")593 self.Reffered_Radio.configure(justify='left')594 self.Reffered_Radio.configure(text='''Reffered''')595 self.Reffered_Radio.configure(value=2)596 self.Reffered_Radio.configure(variable=self.tr_radio)597 self.Screened_Radio = tk.Radiobutton(Satellite_Window)598 self.Screened_Radio.place(relx=0.408, rely=0.257, relheight=0.042, relwidth=0.18)599 self.Screened_Radio.configure(activebackground="#ececec")600 self.Screened_Radio.configure(activeforeground="#000000")601 self.Screened_Radio.configure(background="#d9d9d9")602 self.Screened_Radio.configure(disabledforeground="#a3a3a3")603 self.Screened_Radio.configure(font=font14)604 self.Screened_Radio.configure(foreground="#000000")605 self.Screened_Radio.configure(highlightbackground="#d9d9d9")606 self.Screened_Radio.configure(highlightcolor="black")607 self.Screened_Radio.configure(justify='left')608 self.Screened_Radio.configure(text='''Screened''')609 self.Screened_Radio.configure(value=3)610 self.Screened_Radio.configure(variable=self.tr_radio)611 self.populate_list()612 # Returns the list of all the entries in the window613 def get_entry_object(self):614 entries = [615 self.Date_Entry,616 self.From_Entry,617 self.To_Entry,618 self.center_radio,619 self.Incharge_Entry,620 self.Phone_Entry,621 self.Endodontics_Entry,622 self.Periodont_Entry,623 self.Orthodontics_Entry,624 self.Surgery_Entry,625 self.Pedodont_Entry,626 self.Oralpatho_Entry,627 self.Public_Health_Entry,628 self.Oral_Mea_Entry,629 self.Prostho_Entry,630 self.tr_radio,631 self.Grand_Total_Entry632 ]633 return entries634 635 # Adds a row to the database' respective table by getting inputs from entries636 637 def add_item(self):638 # Getting the values entered in each Entry box objects639 entries = self.get_entry_object()640 for i in range(0, len(entries)):641 entries[i] = entries[i].get()642 self.data.insert("satellite", entries)643 self.clear_text()644 self.populate_list()645 print("1 row added")646 647 # Clears all the data entered in the entries648 649 def clear_text(self):650 entries = self.get_entry_object()651 for i in range(0, len(entries)):652 try:653 entries[i].delete(0, tk.END)654 except AttributeError:655 pass656 657 # Returns the item selected in the listbox658 659 def select_item(self):660 index = self.Scrolledlistbox3.curselection()[0]661 selected_item = self.Scrolledlistbox3.get(index)662 return selected_item663 664 # Removes the item selected in the listbox665 666 def remove_item(self):667 selected = self.select_item()668 self.data.remove("satellite", selected[0])669 self.populate_list()670 print("Selected Item deleted")671 672 # Updates the item selected in list box with the values entered in Entry boxes673 674 def update_item(self):675 selected = self.select_item()676 values = self.get_entry_object()677 # id of new_values is as same as the old value678 new_values = [selected[0]]679 for val in values[1:]:680 new_values.append(val.get())681 self.data.update("satellite", new_values)682 self.clear_text()683 self.populate_list()684 print("Selected Item Updated")685 686 # Updates the list box with the current content of the table687 def populate_list(self):688 self.Scrolledlistbox3.delete(0, tk.END)689 for row in self.data.fetch("satellite"):690 self.Scrolledlistbox3.insert(tk.END, row)691 self.count = self.data.get_count("satellite")692# The following code is added to facilitate the Scrolled widgets you specified.693class AutoScroll(object):694 '''Configure the scrollbars for a widget.'''695 def __init__(self, master):696 # Rozen. Added the try-except clauses so that this class697 # could be used for scrolled entry widget for which vertical698 # scrolling is not supported. 5/7/14.699 try:700 vsb = ttk.Scrollbar(master, orient='vertical', command=self.yview)701 except:702 pass703 hsb = ttk.Scrollbar(master, orient='horizontal', command=self.xview)704 # self.configure(yscrollcommand=_autoscroll(vsb),705 # xscrollcommand=_autoscroll(hsb))706 try:707 self.configure(yscrollcommand=self._autoscroll(vsb))708 except:709 pass710 self.configure(xscrollcommand=self._autoscroll(hsb))711 self.grid(column=0, row=0, sticky='nsew')712 try:713 vsb.grid(column=1, row=0, sticky='ns')714 except:715 pass716 hsb.grid(column=0, row=1, sticky='ew')717 master.grid_columnconfigure(0, weight=1)718 master.grid_rowconfigure(0, weight=1)719 # Copy geometry methods of master (taken from ScrolledText.py)720 if py3:721 methods = tk.Pack.__dict__.keys() | tk.Grid.__dict__.keys() \722 | tk.Place.__dict__.keys()723 else:724 methods = tk.Pack.__dict__.keys() + tk.Grid.__dict__.keys() \725 + tk.Place.__dict__.keys()726 for meth in methods:727 if meth[0] != '_' and meth not in ('config', 'configure'):728 setattr(self, meth, getattr(master, meth))729 @staticmethod730 def _autoscroll(sbar):731 '''Hide and show scrollbar as needed.'''732 def wrapped(first, last):...
department_window.py
Source:department_window.py
...59 self.style = ttk.Style()60 self.data = Database("dental.db")61 if sys.platform == "win32":62 self.style.theme_use('winnative')63 self.style.configure('.',background=_bgcolor)64 self.style.configure('.',foreground=_fgcolor)65 self.style.map('.',background=66 [('selected', _compcolor), ('active',_ana2color)])67 Department_Window.geometry("1491x739+35+31")68 Department_Window.minsize(148, 1)69 Department_Window.maxsize(4112, 1030)70 Department_Window.resizable(1, 1)71 Department_Window.title("DEPARTMENT OUT-PATIENT")72 Department_Window.configure(background="#40b3a3")73 Department_Window.configure(highlightbackground="#d9d9d9")74 Department_Window.configure(highlightcolor="black")75 self.menubar = tk.Menu(Department_Window, font=font9, bg=_bgcolor, fg=_fgcolor)76 Department_Window.configure(menu = self.menubar)77 self.File = tk.Menu(Department_Window, tearoff=0)78 self.menubar.add_cascade(menu=self.File,79 activebackground="#ececec",80 activeforeground="#000000",81 background="#d9d9d9",82 font=('-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),83 foreground="#000000",84 label="File")85 self.File.add_command(86 activebackground="#ececec",87 activeforeground="#000000",88 background="#d9d9d9",89 font=('-family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0'),90 foreground="#000000",91 label="Exit",92 command=department_window_support.destroy_window)93 self.Department_Label = tk.Label(Department_Window)94 self.Department_Label.place(relx=0.241, rely=0.027, relwidth = 0.518, relheight= 0.084)95 self.Department_Label.configure(activebackground="#f9f9f9")96 self.Department_Label.configure(activeforeground="black")97 self.Department_Label.configure(background="#d9d9d9")98 self.Department_Label.configure(disabledforeground="#a3a3a3")99 self.Department_Label.configure(font="-family {Helvetica} -size 18 -weight normal")100 self.Department_Label.configure(foreground="#000000")101 self.Department_Label.configure(highlightbackground="#d9d9d9")102 self.Department_Label.configure(highlightcolor="black")103 self.Department_Label.configure(relief="raised")104 self.Department_Label.configure(text='''Department Out Patient''')105 self.on_radio = tk.IntVar(None, 1)106 self.Old_Patient_Radio = tk.Radiobutton(Department_Window)107 self.Old_Patient_Radio.place(relx=0.013, rely=0.124, relheight=0.042, relwidth=0.18)108 self.Old_Patient_Radio.configure(activebackground="#ececec")109 self.Old_Patient_Radio.configure(activeforeground="#000000")110 self.Old_Patient_Radio.configure(background="#d9d9d9")111 self.Old_Patient_Radio.configure(disabledforeground="#a3a3a3")112 self.Old_Patient_Radio.configure(font=font11)113 self.Old_Patient_Radio.configure(foreground="#000000")114 self.Old_Patient_Radio.configure(highlightbackground="#d9d9d9")115 self.Old_Patient_Radio.configure(highlightcolor="black")116 self.Old_Patient_Radio.configure(justify='left')117 self.Old_Patient_Radio.configure(text='''Old Patient''')118 self.Old_Patient_Radio.configure(value=1)119 self.Old_Patient_Radio.configure(variable=self.on_radio)120 self.New_Patient_Radio = tk.Radiobutton(Department_Window)121 self.New_Patient_Radio.place(relx=0.213, rely=0.124, relheight=0.042, relwidth=0.18)122 self.New_Patient_Radio.configure(activebackground="#ececec")123 self.New_Patient_Radio.configure(activeforeground="#000000")124 self.New_Patient_Radio.configure(background="#d9d9d9")125 self.New_Patient_Radio.configure(disabledforeground="#a3a3a3")126 self.New_Patient_Radio.configure(font=font11)127 self.New_Patient_Radio.configure(foreground="#000000")128 self.New_Patient_Radio.configure(highlightbackground="#d9d9d9")129 self.New_Patient_Radio.configure(highlightcolor="black")130 self.New_Patient_Radio.configure(justify='left')131 self.New_Patient_Radio.configure(text='''New Patient''')132 self.New_Patient_Radio.configure(value=2)133 self.New_Patient_Radio.configure(variable=self.on_radio)134 self.Health_Label = tk.Label(Department_Window)135 self.Health_Label.place(relx=0.410, rely=0.124, relwidth=0.169, relheight=0.05)136 self.Health_Label.configure(activebackground="#f9f9f9")137 self.Health_Label.configure(activeforeground="black")138 self.Health_Label.configure(background="#d9d9d9")139 self.Health_Label.configure(disabledforeground="#a3a3a3")140 self.Health_Label.configure(font="-family {Helvetica} -size 13 -weight normal")141 self.Health_Label.configure(foreground="#000000")142 self.Health_Label.configure(highlightbackground="#d9d9d9")143 self.Health_Label.configure(highlightcolor="black")144 self.Health_Label.configure(text='''Health Education''')145 self.Health_Entry = tk.Entry(Department_Window)146 self.Health_Entry.place(relx=0.599, rely=0.124, relheight=0.048147 , relwidth=0.137)148 self.Health_Entry.configure(background="white")149 self.Health_Entry.configure(disabledforeground="#a3a3a3")150 self.Health_Entry.configure(font="-family {Helvetica} -size 10")151 self.Health_Entry.configure(foreground="#000000")152 self.Health_Entry.configure(highlightbackground="#d9d9d9")153 self.Health_Entry.configure(highlightcolor="black")154 self.Health_Entry.configure(insertbackground="black")155 self.Health_Entry.configure(selectbackground="#c4c4c4")156 self.Health_Entry.configure(selectforeground="black")157 self.Incharge_Label = tk.Label(Department_Window)158 self.Incharge_Label.place(relx=0.013, rely=0.189, relwidth = 0.169, relheight= 0.05)159 self.Incharge_Label.configure(activebackground="#f9f9f9")160 self.Incharge_Label.configure(activeforeground="black")161 self.Incharge_Label.configure(background="#d9d9d9")162 self.Incharge_Label.configure(disabledforeground="#a3a3a3")163 self.Incharge_Label.configure(font="-family {Helvetica} -size 13 -weight normal")164 self.Incharge_Label.configure(foreground="#000000")165 self.Incharge_Label.configure(highlightbackground="#d9d9d9")166 self.Incharge_Label.configure(highlightcolor="black")167 self.Incharge_Label.configure(text='''Incharge''')168 self.Incharge_Entry = tk.Entry(Department_Window)169 self.Incharge_Entry.place(relx=0.188, rely=0.189, relheight=0.048170 , relwidth=0.137)171 self.Incharge_Entry.configure(background="white")172 self.Incharge_Entry.configure(disabledforeground="#a3a3a3")173 self.Incharge_Entry.configure(font="-family {Helvetica} -size 10")174 self.Incharge_Entry.configure(foreground="#000000")175 self.Incharge_Entry.configure(highlightbackground="#d9d9d9")176 self.Incharge_Entry.configure(highlightcolor="black")177 self.Incharge_Entry.configure(insertbackground="black")178 self.Incharge_Entry.configure(selectbackground="#c4c4c4")179 self.Incharge_Entry.configure(selectforeground="black")180 self.Phone_Label = tk.Label(Department_Window)181 self.Phone_Label.place(relx=0.335, rely=0.189, relwidth = 0.162, relheight= 0.05)182 self.Phone_Label.configure(activebackground="#f9f9f9")183 self.Phone_Label.configure(activeforeground="black")184 self.Phone_Label.configure(background="#d9d9d9")185 self.Phone_Label.configure(disabledforeground="#a3a3a3")186 self.Phone_Label.configure(font="-family {Helvetica} -size 13 -weight normal")187 self.Phone_Label.configure(foreground="#000000")188 self.Phone_Label.configure(highlightbackground="#d9d9d9")189 self.Phone_Label.configure(highlightcolor="black")190 self.Phone_Label.configure(text='''Phone''')191 self.Phone_Entry = tk.Entry(Department_Window)192 self.Phone_Entry.place(relx=0.51, rely=0.189, relheight= 0.048, relwidth=0.137)193 self.Phone_Entry.configure(background="white")194 self.Phone_Entry.configure(disabledforeground="#a3a3a3")195 self.Phone_Entry.configure(font="-family {Helvetica} -size 10")196 self.Phone_Entry.configure(foreground="#000000")197 self.Phone_Entry.configure(highlightbackground="#d9d9d9")198 self.Phone_Entry.configure(highlightcolor="black")199 self.Phone_Entry.configure(insertbackground="black")200 self.Phone_Entry.configure(selectbackground="#c4c4c4")201 self.Phone_Entry.configure(selectforeground="black")202 self.Date_Label = tk.Label(Department_Window)203 self.Date_Label.place(relx=0.664, rely=0.189, relwidth = 0.122, relheight= 0.05)204 self.Date_Label.configure(activebackground="#f9f9f9")205 self.Date_Label.configure(activeforeground="black")206 self.Date_Label.configure(background="#d9d9d9")207 self.Date_Label.configure(disabledforeground="#a3a3a3")208 self.Date_Label.configure(font="-family {Helvetica} -size 13 -weight normal")209 self.Date_Label.configure(foreground="#000000")210 self.Date_Label.configure(highlightbackground="#d9d9d9")211 self.Date_Label.configure(highlightcolor="black")212 self.Date_Label.configure(text='''Date\nYYYY-MM-DD''')213 now = datetime.datetime.now()214 self.Date_Entry = DateEntry(Department_Window, year=now.year, month=now.month, day=now.day)215 self.Date_Entry.place(relx=0.791, rely=0.189,relheight = 0.048, relwidth=0.137)216 self.Date_Entry.configure(background="white")217 self.Date_Entry.configure(date_pattern='y/mm/dd')218 self.Date_Entry.configure(font="-family {Helvetica} -size 10")219 self.Date_Entry.configure(foreground="#000000")220 self.Date_Entry.configure(borderwidth=2)221 self.Date_Entry.configure(width=12)222 # self.Date_Entry = tk.Entry(Department_Window)223 # self.Date_Entry.place(relx=0.791, rely=0.189,relheight = 0.048, relwidth=0.137)224 # self.Date_Entry.configure(background="white")225 # self.Date_Entry.configure(disabledforeground="#a3a3a3")226 # self.Date_Entry.configure(font="-family {Helvetica} -size 10")227 # self.Date_Entry.configure(foreground="#000000")228 # self.Date_Entry.configure(highlightbackground="#d9d9d9")229 # self.Date_Entry.configure(highlightcolor="black")230 # self.Date_Entry.configure(insertbackground="black")231 # self.Date_Entry.configure(selectbackground="#c4c4c4")232 # self.Date_Entry.configure(selectforeground="black")233 self.From_Label = tk.Label(Department_Window)234 self.From_Label.place(relx=0.013, rely=0.311, relwidth = 0.162, relheight= 0.05)235 self.From_Label.configure(activebackground="#f9f9f9")236 self.From_Label.configure(activeforeground="black")237 self.From_Label.configure(background="#d9d9d9")238 self.From_Label.configure(disabledforeground="#a3a3a3")239 self.From_Label.configure(font="-family {Helvetica} -size 13 -weight normal")240 self.From_Label.configure(foreground="#000000")241 self.From_Label.configure(highlightbackground="#d9d9d9")242 self.From_Label.configure(highlightcolor="black")243 self.From_Label.configure(text='''ID From''')244 self.From_Entry = tk.Entry(Department_Window)245 self.From_Entry.place(relx=0.188, rely=0.311,relwidth = 0.137, relheight= 0.048)246 self.From_Entry.configure(background="white")247 self.From_Entry.configure(disabledforeground="#a3a3a3")248 self.From_Entry.configure(font="-family {Helvetica} -size 10")249 self.From_Entry.configure(foreground="#000000")250 self.From_Entry.configure(highlightbackground="#d9d9d9")251 self.From_Entry.configure(highlightcolor="black")252 self.From_Entry.configure(insertbackground="black")253 self.From_Entry.configure(selectbackground="#c4c4c4")254 self.From_Entry.configure(selectforeground="black")255 self.To_Label = tk.Label(Department_Window)256 self.To_Label.place(relx=0.335, rely=0.311, relwidth = 0.162, relheight= 0.05)257 self.To_Label.configure(activebackground="#f9f9f9")258 self.To_Label.configure(activeforeground="black")259 self.To_Label.configure(background="#d9d9d9")260 self.To_Label.configure(disabledforeground="#a3a3a3")261 self.To_Label.configure(font="-family {Helvetica} -size 13 -weight normal")262 self.To_Label.configure(foreground="#000000")263 self.To_Label.configure(highlightbackground="#d9d9d9")264 self.To_Label.configure(highlightcolor="black")265 self.To_Label.configure(text='''ID To''')266 self.To_Entry = tk.Entry(Department_Window)267 self.To_Entry.place(relx=0.51, rely=0.311, relwidth = 0.137, relheight= 0.048)268 self.To_Entry.configure(background="white")269 self.To_Entry.configure(disabledforeground="#a3a3a3")270 self.To_Entry.configure(font="-family {Helvetica} -size 10")271 self.To_Entry.configure(foreground="#000000")272 self.To_Entry.configure(highlightbackground="#d9d9d9")273 self.To_Entry.configure(highlightcolor="black")274 self.To_Entry.configure(insertbackground="black")275 self.To_Entry.configure(selectbackground="#c4c4c4")276 self.To_Entry.configure(selectforeground="black")277 self.Endodontics_Label = tk.Label(Department_Window)278 self.Endodontics_Label.place(relx=0.013, rely=0.379, relwidth = 0.162, relheight= 0.05)279 self.Endodontics_Label.configure(activebackground="#f9f9f9")280 self.Endodontics_Label.configure(activeforeground="black")281 self.Endodontics_Label.configure(background="#d9d9d9")282 self.Endodontics_Label.configure(disabledforeground="#a3a3a3")283 self.Endodontics_Label.configure(font="-family {Helvetica} -size 13 -weight normal")284 self.Endodontics_Label.configure(foreground="#000000")285 self.Endodontics_Label.configure(highlightbackground="#d9d9d9")286 self.Endodontics_Label.configure(highlightcolor="black")287 self.Endodontics_Label.configure(text='''Endodontics''')288 self.Periodont_Label = tk.Label(Department_Window)289 self.Periodont_Label.place(relx=0.013, rely=0.447, relwidth = 0.162, relheight= 0.05)290 self.Periodont_Label.configure(activebackground="#f9f9f9")291 self.Periodont_Label.configure(activeforeground="black")292 self.Periodont_Label.configure(background="#d9d9d9")293 self.Periodont_Label.configure(disabledforeground="#a3a3a3")294 self.Periodont_Label.configure(font="-family {Helvetica} -size 13 -weight normal")295 self.Periodont_Label.configure(foreground="#000000")296 self.Periodont_Label.configure(highlightbackground="#d9d9d9")297 self.Periodont_Label.configure(highlightcolor="black")298 self.Periodont_Label.configure(text='''Periodont''')299 self.Orthodontics_Label = tk.Label(Department_Window)300 self.Orthodontics_Label.place(relx=0.013, rely=0.514, relwidth = 0.162, relheight= 0.05)301 self.Orthodontics_Label.configure(activebackground="#f9f9f9")302 self.Orthodontics_Label.configure(activeforeground="black")303 self.Orthodontics_Label.configure(background="#d9d9d9")304 self.Orthodontics_Label.configure(disabledforeground="#a3a3a3")305 self.Orthodontics_Label.configure(font="-family {Helvetica} -size 13 -weight normal")306 self.Orthodontics_Label.configure(foreground="#000000")307 self.Orthodontics_Label.configure(highlightbackground="#d9d9d9")308 self.Orthodontics_Label.configure(highlightcolor="black")309 self.Orthodontics_Label.configure(text='''Orthodontics''')310 self.Surgery_Label = tk.Label(Department_Window)311 self.Surgery_Label.place(relx=0.013, rely=0.582,relwidth = 0.162, relheight= 0.05)312 self.Surgery_Label.configure(activebackground="#f9f9f9")313 self.Surgery_Label.configure(activeforeground="black")314 self.Surgery_Label.configure(background="#d9d9d9")315 self.Surgery_Label.configure(disabledforeground="#a3a3a3")316 self.Surgery_Label.configure(font="-family {Helvetica} -size 13 -weight normal")317 self.Surgery_Label.configure(foreground="#000000")318 self.Surgery_Label.configure(highlightbackground="#d9d9d9")319 self.Surgery_Label.configure(highlightcolor="black")320 self.Surgery_Label.configure(text='''Surgery''')321 self.Pedodont_Label = tk.Label(Department_Window)322 self.Pedodont_Label.place(relx=0.013, rely=0.65, relwidth = 0.162, relheight= 0.05)323 self.Pedodont_Label.configure(activebackground="#f9f9f9")324 self.Pedodont_Label.configure(activeforeground="black")325 self.Pedodont_Label.configure(background="#d9d9d9")326 self.Pedodont_Label.configure(disabledforeground="#a3a3a3")327 self.Pedodont_Label.configure(font="-family {Helvetica} -size 13 -weight normal")328 self.Pedodont_Label.configure(foreground="#000000")329 self.Pedodont_Label.configure(highlightbackground="#d9d9d9")330 self.Pedodont_Label.configure(highlightcolor="black")331 self.Pedodont_Label.configure(text='''Pedodont''')332 self.Oralpatho_Label = tk.Label(Department_Window)333 self.Oralpatho_Label.place(relx=0.335, rely=0.379,relwidth = 0.162, relheight= 0.05)334 self.Oralpatho_Label.configure(activebackground="#f9f9f9")335 self.Oralpatho_Label.configure(activeforeground="black")336 self.Oralpatho_Label.configure(background="#d9d9d9")337 self.Oralpatho_Label.configure(disabledforeground="#a3a3a3")338 self.Oralpatho_Label.configure(font="-family {Helvetica} -size 13 -weight normal")339 self.Oralpatho_Label.configure(foreground="#000000")340 self.Oralpatho_Label.configure(highlightbackground="#d9d9d9")341 self.Oralpatho_Label.configure(highlightcolor="black")342 self.Oralpatho_Label.configure(text='''Oralpatho''')343 self.Public_Health_Label = tk.Label(Department_Window)344 self.Public_Health_Label.place(relx=0.335, rely=0.447,relwidth = 0.162, relheight= 0.05)345 self.Public_Health_Label.configure(activebackground="#f9f9f9")346 self.Public_Health_Label.configure(activeforeground="black")347 self.Public_Health_Label.configure(background="#d9d9d9")348 self.Public_Health_Label.configure(disabledforeground="#a3a3a3")349 self.Public_Health_Label.configure(font="-family {Helvetica} -size 13 -weight normal")350 self.Public_Health_Label.configure(foreground="#000000")351 self.Public_Health_Label.configure(highlightbackground="#d9d9d9")352 self.Public_Health_Label.configure(highlightcolor="black")353 self.Public_Health_Label.configure(text='''Public Health''')354 self.Oral_Mea_Label = tk.Label(Department_Window)355 self.Oral_Mea_Label.place(relx=0.335, rely=0.514,relwidth = 0.162, relheight= 0.05)356 self.Oral_Mea_Label.configure(activebackground="#f9f9f9")357 self.Oral_Mea_Label.configure(activeforeground="black")358 self.Oral_Mea_Label.configure(background="#d9d9d9")359 self.Oral_Mea_Label.configure(disabledforeground="#a3a3a3")360 self.Oral_Mea_Label.configure(font="-family {Helvetica} -size 13 -weight normal")361 self.Oral_Mea_Label.configure(foreground="#000000")362 self.Oral_Mea_Label.configure(highlightbackground="#d9d9d9")363 self.Oral_Mea_Label.configure(highlightcolor="black")364 self.Oral_Mea_Label.configure(text='''Oral mea''')365 self.Ping_Thread_Label = tk.Label(Department_Window)366 self.Ping_Thread_Label.place(relx=0.335, rely=0.582, relwidth = 0.162, relheight= 0.05)367 self.Ping_Thread_Label.configure(activebackground="#f9f9f9")368 self.Ping_Thread_Label.configure(activeforeground="black")369 self.Ping_Thread_Label.configure(background="#d9d9d9")370 self.Ping_Thread_Label.configure(disabledforeground="#a3a3a3")371 self.Ping_Thread_Label.configure(font="-family {Helvetica} -size 13 -weight normal")372 self.Ping_Thread_Label.configure(foreground="#000000")373 self.Ping_Thread_Label.configure(highlightbackground="#d9d9d9")374 self.Ping_Thread_Label.configure(highlightcolor="black")375 self.Ping_Thread_Label.configure(text='''Prostho''')376 self.Grand_Total_Label = tk.Label(Department_Window)377 self.Grand_Total_Label.place(relx=0.335, rely=0.65, relwidth = 0.162, relheight= 0.05)378 self.Grand_Total_Label.configure(activebackground="#f9f9f9")379 self.Grand_Total_Label.configure(activeforeground="black")380 self.Grand_Total_Label.configure(background="#d9d9d9")381 self.Grand_Total_Label.configure(disabledforeground="#a3a3a3")382 self.Grand_Total_Label.configure(font="-family {Helvetica} -size 13 -weight normal")383 self.Grand_Total_Label.configure(foreground="#000000")384 self.Grand_Total_Label.configure(highlightbackground="#d9d9d9")385 self.Grand_Total_Label.configure(highlightcolor="black")386 self.Grand_Total_Label.configure(text='''Grand Total''')387 #Defining the entries388 self.Endodontics_Entry = tk.Entry(Department_Window)389 self.Endodontics_Entry.place(relx=0.188, rely=0.379,relwidth = 0.137, relheight= 0.048)390 self.Endodontics_Entry.configure(background="white")391 self.Endodontics_Entry.configure(disabledforeground="#a3a3a3")392 self.Endodontics_Entry.configure(font="-family {Helvetica} -size 10")393 self.Endodontics_Entry.configure(foreground="#000000")394 self.Endodontics_Entry.configure(highlightbackground="#d9d9d9")395 self.Endodontics_Entry.configure(highlightcolor="black")396 self.Endodontics_Entry.configure(insertbackground="black")397 self.Endodontics_Entry.configure(selectbackground="#c4c4c4")398 self.Endodontics_Entry.configure(selectforeground="black")399 self.Periodont_Entry = tk.Entry(Department_Window)400 self.Periodont_Entry.place(relx=0.188, rely=0.447,relwidth = 0.137, relheight= 0.048)401 self.Periodont_Entry.configure(background="white")402 self.Periodont_Entry.configure(disabledforeground="#a3a3a3")403 self.Periodont_Entry.configure(font="-family {Helvetica} -size 10")404 self.Periodont_Entry.configure(foreground="#000000")405 self.Periodont_Entry.configure(highlightbackground="#d9d9d9")406 self.Periodont_Entry.configure(highlightcolor="black")407 self.Periodont_Entry.configure(insertbackground="black")408 self.Periodont_Entry.configure(selectbackground="#c4c4c4")409 self.Periodont_Entry.configure(selectforeground="black")410 self.Orthodontics_Entry = tk.Entry(Department_Window)411 self.Orthodontics_Entry.place(relx=0.188, rely=0.514, relwidth = 0.137, relheight= 0.048)412 self.Orthodontics_Entry.configure(background="white")413 self.Orthodontics_Entry.configure(disabledforeground="#a3a3a3")414 self.Orthodontics_Entry.configure(font="-family {Helvetica} -size 10")415 self.Orthodontics_Entry.configure(foreground="#000000")416 self.Orthodontics_Entry.configure(highlightbackground="#d9d9d9")417 self.Orthodontics_Entry.configure(highlightcolor="black")418 self.Orthodontics_Entry.configure(insertbackground="black")419 self.Orthodontics_Entry.configure(selectbackground="#c4c4c4")420 self.Orthodontics_Entry.configure(selectforeground="black")421 self.Surgery_Entry = tk.Entry(Department_Window)422 self.Surgery_Entry.place(relx=0.188, rely=0.582, relwidth = 0.137, relheight= 0.048)423 self.Surgery_Entry.configure(background="white")424 self.Surgery_Entry.configure(disabledforeground="#a3a3a3")425 self.Surgery_Entry.configure(font="-family {Helvetica} -size 10")426 self.Surgery_Entry.configure(foreground="#000000")427 self.Surgery_Entry.configure(highlightbackground="#d9d9d9")428 self.Surgery_Entry.configure(highlightcolor="black")429 self.Surgery_Entry.configure(insertbackground="black")430 self.Surgery_Entry.configure(selectbackground="#c4c4c4")431 self.Surgery_Entry.configure(selectforeground="black")432 self.Pedodont_Entry = tk.Entry(Department_Window)433 self.Pedodont_Entry.place(relx=0.188, rely=0.65,relwidth = 0.137, relheight= 0.048)434 self.Pedodont_Entry.configure(background="white")435 self.Pedodont_Entry.configure(disabledforeground="#a3a3a3")436 self.Pedodont_Entry.configure(font="-family {Helvetica} -size 10")437 self.Pedodont_Entry.configure(foreground="#000000")438 self.Pedodont_Entry.configure(highlightbackground="#d9d9d9")439 self.Pedodont_Entry.configure(highlightcolor="black")440 self.Pedodont_Entry.configure(insertbackground="black")441 self.Pedodont_Entry.configure(selectbackground="#c4c4c4")442 self.Pedodont_Entry.configure(selectforeground="black")443 self.Oralpatho_Entry = tk.Entry(Department_Window)444 self.Oralpatho_Entry.place(relx=0.51, rely=0.379,relwidth = 0.137, relheight= 0.048)445 self.Oralpatho_Entry.configure(background="white")446 self.Oralpatho_Entry.configure(disabledforeground="#a3a3a3")447 self.Oralpatho_Entry.configure(font="-family {Helvetica} -size 10")448 self.Oralpatho_Entry.configure(foreground="#000000")449 self.Oralpatho_Entry.configure(highlightbackground="#d9d9d9")450 self.Oralpatho_Entry.configure(highlightcolor="black")451 self.Oralpatho_Entry.configure(insertbackground="black")452 self.Oralpatho_Entry.configure(selectbackground="#c4c4c4")453 self.Oralpatho_Entry.configure(selectforeground="black")454 self.Public_Health_Entry = tk.Entry(Department_Window)455 self.Public_Health_Entry.place(relx=0.51, rely=0.447,relwidth = 0.137, relheight= 0.048)456 self.Public_Health_Entry.configure(background="white")457 self.Public_Health_Entry.configure(disabledforeground="#a3a3a3")458 self.Public_Health_Entry.configure(font="-family {Helvetica} -size 10")459 self.Public_Health_Entry.configure(foreground="#000000")460 self.Public_Health_Entry.configure(highlightbackground="#d9d9d9")461 self.Public_Health_Entry.configure(highlightcolor="black")462 self.Public_Health_Entry.configure(insertbackground="black")463 self.Public_Health_Entry.configure(selectbackground="#c4c4c4")464 self.Public_Health_Entry.configure(selectforeground="black")465 self.Oral_Mea_Entry = tk.Entry(Department_Window)466 self.Oral_Mea_Entry.place(relx=0.51, rely=0.514,relwidth = 0.137, relheight= 0.048)467 self.Oral_Mea_Entry.configure(background="white")468 self.Oral_Mea_Entry.configure(disabledforeground="#a3a3a3")469 self.Oral_Mea_Entry.configure(font="-family {Helvetica} -size 10")470 self.Oral_Mea_Entry.configure(foreground="#000000")471 self.Oral_Mea_Entry.configure(highlightbackground="#d9d9d9")472 self.Oral_Mea_Entry.configure(highlightcolor="black")473 self.Oral_Mea_Entry.configure(insertbackground="black")474 self.Oral_Mea_Entry.configure(selectbackground="#c4c4c4")475 self.Oral_Mea_Entry.configure(selectforeground="black")476 self.Ping_Thread_Entry = tk.Entry(Department_Window)477 self.Ping_Thread_Entry.place(relx=0.51, rely=0.582,relwidth = 0.137, relheight= 0.048)478 self.Ping_Thread_Entry.configure(background="white")479 self.Ping_Thread_Entry.configure(disabledforeground="#a3a3a3")480 self.Ping_Thread_Entry.configure(font="-family {Helvetica} -size 10")481 self.Ping_Thread_Entry.configure(foreground="#000000")482 self.Ping_Thread_Entry.configure(highlightbackground="#d9d9d9")483 self.Ping_Thread_Entry.configure(highlightcolor="black")484 self.Ping_Thread_Entry.configure(insertbackground="black")485 self.Ping_Thread_Entry.configure(selectbackground="#c4c4c4")486 self.Ping_Thread_Entry.configure(selectforeground="black")487 self.Grand_Total_Entry = tk.Entry(Department_Window)488 self.Grand_Total_Entry.place(relx=0.51, rely=0.65, relwidth = 0.137, relheight= 0.048)489 self.Grand_Total_Entry.configure(background="white")490 self.Grand_Total_Entry.configure(disabledforeground="#a3a3a3")491 self.Grand_Total_Entry.configure(font="-family {Helvetica} -size 10")492 self.Grand_Total_Entry.configure(foreground="#000000")493 self.Grand_Total_Entry.configure(highlightbackground="#d9d9d9")494 self.Grand_Total_Entry.configure(highlightcolor="black")495 self.Grand_Total_Entry.configure(insertbackground="black")496 self.Grand_Total_Entry.configure(selectbackground="#c4c4c4")497 self.Grand_Total_Entry.configure(selectforeground="black")498 self.Add_Button_ = tk.Button(Department_Window)499 self.Add_Button_.place(relx=0.798, rely=0.311, relwidth = 0.078, relheight= 0.06)500 self.Add_Button_.configure(activebackground="#ececec")501 self.Add_Button_.configure(activeforeground="#000000")502 self.Add_Button_.configure(background="#d9d9d9")503 self.Add_Button_.configure(disabledforeground="#a3a3a3")504 self.Add_Button_.configure(font="-family {Helvetica} -size 13 -weight normal")505 self.Add_Button_.configure(foreground="#000000")506 self.Add_Button_.configure(highlightbackground="#d9d9d9")507 self.Add_Button_.configure(highlightcolor="black")508 self.Add_Button_.configure(pady="0")509 self.Add_Button_.configure(text='''ADD''', command=self.add_item)510 self.Delete_Button = tk.Button(Department_Window)511 self.Delete_Button.place(relx=0.798, rely=0.392, relwidth = 0.078, relheight= 0.06)512 self.Delete_Button.configure(activebackground="#ececec")513 self.Delete_Button.configure(activeforeground="#000000")514 self.Delete_Button.configure(background="#d9d9d9")515 self.Delete_Button.configure(disabledforeground="#a3a3a3")516 self.Delete_Button.configure(font="-family {Helvetica} -size 13 -weight normal")517 self.Delete_Button.configure(foreground="#000000")518 self.Delete_Button.configure(highlightbackground="#d9d9d9")519 self.Delete_Button.configure(highlightcolor="black")520 self.Delete_Button.configure(pady="0")521 self.Delete_Button.configure(text='''DELETE''', command=self.remove_item)522 self.Update_Button = tk.Button(Department_Window)523 self.Update_Button.place(relx=0.798, rely=0.474, relwidth = 0.078, relheight= 0.06)524 self.Update_Button.configure(activebackground="#ececec")525 self.Update_Button.configure(activeforeground="#000000")526 self.Update_Button.configure(background="#d9d9d9")527 self.Update_Button.configure(disabledforeground="#a3a3a3")528 self.Update_Button.configure(font="-family {Helvetica} -size 13 -weight normal")529 self.Update_Button.configure(foreground="#000000")530 self.Update_Button.configure(highlightbackground="#d9d9d9")531 self.Update_Button.configure(highlightcolor="black")532 self.Update_Button.configure(pady="0")533 self.Update_Button.configure(text='''UPDATE''', command=self.update_item)534 self.Clear_Button = tk.Button(Department_Window)535 self.Clear_Button.place(relx=0.798, rely=0.555, relwidth = 0.078, relheight= 0.06)536 self.Clear_Button.configure(activebackground="#ececec")537 self.Clear_Button.configure(activeforeground="#000000")538 self.Clear_Button.configure(background="#d9d9d9")539 self.Clear_Button.configure(disabledforeground="#a3a3a3")540 self.Clear_Button.configure(font="-family {Helvetica} -size 13 -weight normal")541 self.Clear_Button.configure(foreground="#000000")542 self.Clear_Button.configure(highlightbackground="#d9d9d9")543 self.Clear_Button.configure(highlightcolor="black")544 self.Clear_Button.configure(pady="0")545 self.Clear_Button.configure(text='''CLEAR''', command=self.clear_text)546 self.Scrolledlistbox3 = ScrolledListBox(Department_Window)547 self.Scrolledlistbox3.place(relx=0.02, rely=0.717, relheight=0.253548 , relwidth=0.969)549 self.Scrolledlistbox3.configure(background="white")550 self.Scrolledlistbox3.configure(disabledforeground="#a3a3a3")551 self.Scrolledlistbox3.configure(font=font10)552 self.Scrolledlistbox3.configure(foreground="black")553 self.Scrolledlistbox3.configure(highlightbackground="#d9d9d9")554 self.Scrolledlistbox3.configure(highlightcolor="#d9d9d9")555 self.Scrolledlistbox3.configure(selectbackground="#c4c4c4")556 self.Scrolledlistbox3.configure(selectforeground="black")557 self.tr_radio = tk.IntVar(None, 1)558 self.Treated_Radio = tk.Radiobutton(Department_Window)559 self.Treated_Radio.place(relx=0.013, rely=0.257, relheight=0.042560 , relwidth=0.18)561 self.Treated_Radio.configure(activebackground="#ececec")562 self.Treated_Radio.configure(activeforeground="#000000")563 self.Treated_Radio.configure(background="#d9d9d9")564 self.Treated_Radio.configure(disabledforeground="#a3a3a3")565 self.Treated_Radio.configure(font=font11)566 self.Treated_Radio.configure(foreground="#000000")567 self.Treated_Radio.configure(highlightbackground="#d9d9d9")568 self.Treated_Radio.configure(highlightcolor="black")569 self.Treated_Radio.configure(justify='left')570 self.Treated_Radio.configure(text='''Treated''')571 self.Treated_Radio.configure(value=1)572 self.Treated_Radio.configure(variable=self.tr_radio)573 self.Reffered_Radio = tk.Radiobutton(Department_Window)574 self.Reffered_Radio.place(relx=0.208, rely=0.257, relheight=0.042575 , relwidth=0.18)576 self.Reffered_Radio.configure(activebackground="#ececec")577 self.Reffered_Radio.configure(activeforeground="#000000")578 self.Reffered_Radio.configure(background="#d9d9d9")579 self.Reffered_Radio.configure(disabledforeground="#a3a3a3")580 self.Reffered_Radio.configure(font=font11)581 self.Reffered_Radio.configure(foreground="#000000")582 self.Reffered_Radio.configure(highlightbackground="#d9d9d9")583 self.Reffered_Radio.configure(highlightcolor="black")584 self.Reffered_Radio.configure(justify='left')585 self.Reffered_Radio.configure(text='''Reffered''')586 self.Reffered_Radio.configure(value=2)587 self.Reffered_Radio.configure(variable=self.tr_radio)588 self.Screened_Radio = tk.Radiobutton(Department_Window)589 self.Screened_Radio.place(relx=0.408, rely=0.257, relheight=0.042590 , relwidth=0.18)591 self.Screened_Radio.configure(activebackground="#ececec")592 self.Screened_Radio.configure(activeforeground="#000000")593 self.Screened_Radio.configure(background="#d9d9d9")594 self.Screened_Radio.configure(disabledforeground="#a3a3a3")595 self.Screened_Radio.configure(font=font11)596 self.Screened_Radio.configure(foreground="#000000")597 self.Screened_Radio.configure(highlightbackground="#d9d9d9")598 self.Screened_Radio.configure(highlightcolor="black")599 self.Screened_Radio.configure(justify='left')600 self.Screened_Radio.configure(text='''Screened''')601 self.Screened_Radio.configure(value=3)602 self.Screened_Radio.configure(variable=self.tr_radio)603 self.populate_list()604 605 # Returns the list of all the entries in the window606 def get_entry_object(self):607 entries = [608 self.Date_Entry,609 self.on_radio,610 self.Health_Entry,611 self.From_Entry,612 self.To_Entry,613 self.Incharge_Entry,614 self.Phone_Entry,615 self.Endodontics_Entry,616 self.Periodont_Entry,617 self.Orthodontics_Entry,618 self.Surgery_Entry,619 self.Pedodont_Entry,620 self.Oralpatho_Entry,621 self.Public_Health_Entry,622 self.Oral_Mea_Entry,623 self.Ping_Thread_Entry,624 self.tr_radio,625 self.Grand_Total_Entry626 ]627 return entries628 629 # Adds a row to the database' respective table by getting inputs from entries630 def add_item(self):631 # Getting the values entered in each Entry box objects632 entries = self.get_entry_object()633 for i in range(0,len(entries)):634 entries[i] = entries[i].get()635 self.data.insert("dept", entries)636 self.clear_text()637 self.populate_list()638 print("1 row added")639 # Clears all the data entered in the entries640 def clear_text(self):641 entries = self.get_entry_object()642 for i in range(0,len(entries)):643 try:644 entries[i].delete(0, tk.END)645 except AttributeError:646 pass647 648 # Returns the item selected in the listbox649 def select_item(self):650 index = self.Scrolledlistbox3.curselection()[0]651 selected_item = self.Scrolledlistbox3.get(index)652 return selected_item653 # Removes the item selected in the listbox654 def remove_item(self):655 selected = self.select_item()656 print(selected[0])657 self.data.remove("dept", selected[0])658 self.populate_list()659 print("Selected Item deleted")660 # Updates the item selected in list box with the values entered in Entry boxes661 def update_item(self):662 selected = self.select_item()663 values = self.get_entry_object()664 # id of new_values is as same as the old value665 new_values = [selected[0]]666 for val in values[1:]:667 new_values.append(val.get())668 self.data.update("dept", new_values)669 self.clear_text()670 self.populate_list()671 print("Selected Item Updated")672 # Updates the list box with the current content of the table673 def populate_list(self):674 self.Scrolledlistbox3.delete(0,tk.END)675 for row in self.data.fetch("dept"):676 self.Scrolledlistbox3.insert(tk.END,row)677 self.count = self.data.get_count("dept")678# The following code is added to facilitate the Scrolled widgets you specified.679class AutoScroll(object):680 '''Configure the scrollbars for a widget.'''681 def __init__(self, master):682 # Rozen. Added the try-except clauses so that this class683 # could be used for scrolled entry widget for which vertical684 # scrolling is not supported. 5/7/14.685 try:686 vsb = ttk.Scrollbar(master, orient='vertical', command=self.yview)687 except:688 pass689 hsb = ttk.Scrollbar(master, orient='horizontal', command=self.xview)690 #self.configure(yscrollcommand=_autoscroll(vsb),691 # xscrollcommand=_autoscroll(hsb))692 try:693 self.configure(yscrollcommand=self._autoscroll(vsb))694 except:695 pass696 self.configure(xscrollcommand=self._autoscroll(hsb))697 self.grid(column=0, row=0, sticky='nsew')698 try:699 vsb.grid(column=1, row=0, sticky='ns')700 except:701 pass702 hsb.grid(column=0, row=1, sticky='ew')703 master.grid_columnconfigure(0, weight=1)704 master.grid_rowconfigure(0, weight=1)705 # Copy geometry methods of master (taken from ScrolledText.py)706 if py3:707 methods = tk.Pack.__dict__.keys() | tk.Grid.__dict__.keys() \708 | tk.Place.__dict__.keys()709 else:710 methods = tk.Pack.__dict__.keys() + tk.Grid.__dict__.keys() \711 + tk.Place.__dict__.keys()712 for meth in methods:713 if meth[0] != '_' and meth not in ('config', 'configure'):714 setattr(self, meth, getattr(master, meth))715 @staticmethod716 def _autoscroll(sbar):717 '''Hide and show scrollbar as needed.'''718 def wrapped(first, last):...
BAIassignment10.py
Source:BAIassignment10.py
...350 DisplayClassVar.set(IndividualData["Class"])351 352# LabelName=tk.Label(Frame2)353# LabelName.place(relx=0.082, rely=0.195, height=21)354# LabelName.configure(text="Name :"+IndividualData["Name"])355# 356# LabelAge=tk.Label(Frame2)357# LabelAge.place(relx=0.082, rely=0.39, height=21)358# LabelAge.configure(text="Age :"+str(IndividualData["Age"]))359# 360# LabelAgeGroup=tk.Label(Frame2)361# LabelAgeGroup.place(relx=0.082, rely=0.488, height=21)362# LabelAgeGroup.configure(text="AgeGroup :"+str(IndividualData["AgeGroup"]))363# 364# LabelABI=tk.Label(Frame2)365# LabelABI.place(relx=0.082, rely=0.586, height=21)366# LabelABI.configure(text="ABI :"+str(IndividualData["ABI"]))367 368 369 370#Constants Value371_bgcolor = '#d9d9d9' 372_fgcolor = '#000000' 373_compcolor = '#d9d9d9' 374_ana1color = '#d9d9d9' 375_ana2color = '#ececec' 376top = tk.Tk()377top.geometry("600x450+486+169")378top.minsize(120, 1)379top.maxsize(1370, 749)380top.resizable(1, 1)381top.title("BAI Analyzer")382top.configure(background="#d9d9d9")383welcomeLabel = tk.Label(top)384welcomeLabel.place(relx=0.317, rely=0.022, height=35)385welcomeLabel.configure(background="#d9d9d9")386welcomeLabel.configure(disabledforeground="#a3a3a3")387welcomeLabel.configure(foreground="#000000")388welcomeLabel.configure(font="20")389welcomeLabel.configure(text='''Welcome to ABI Analyzer.''')390 391Frame1 = tk.Frame(top)392Frame1.place(relx=0.033, rely=0.089, relheight=0.456393 , relwidth=0.475)394Frame1.configure(relief='groove')395Frame1.configure(borderwidth="2")396Frame1.configure(relief="groove")397Frame1.configure(background="#d9d9d9")398LabelRwindow= tk.Label(Frame1)399LabelRwindow.place(relx=0.281, rely=0.049, height=21)400LabelRwindow.configure(background="#d9d9d9")401LabelRwindow.configure(disabledforeground="#a3a3a3")402LabelRwindow.configure(foreground="#000000")403LabelRwindow.configure(font="16")404LabelRwindow.configure(text='''Respondents Window.''')405LabelRname = tk.Label(Frame1)406LabelRname.place(relx=0.035, rely=0.195, height=21, width=38)407LabelRname.configure(background="#d9d9d9")408LabelRname.configure(disabledforeground="#a3a3a3")409LabelRname.configure(foreground="#000000")410LabelRname.configure(text='''Name''')411EntryNameVar=tk.StringVar()412EntryName = tk.Entry(Frame1)413EntryName.place(relx=0.211, rely=0.195,height=20, relwidth=0.4)414EntryName.configure(background="white")415EntryName.configure(disabledforeground="#a3a3a3")416EntryName.configure(font="TkFixedFont")417EntryName.configure(foreground="#000000")418EntryName.configure(insertbackground="black")419EntryName.configure(textvariable=EntryNameVar)420Label3 = tk.Label(Frame1)421Label3.place(relx=0.667, rely=0.195, height=21, width=27)422Label3.configure(background="#d9d9d9")423Label3.configure(disabledforeground="#a3a3a3")424Label3.configure(foreground="#000000")425Label3.configure(text='''Age''')426EntryAge = tk.Entry(Frame1)427EntryAge.place(relx=0.772, rely=0.195,height=20, relwidth=0.119)428EntryAge.configure(background="white")429EntryAge.configure(disabledforeground="#a3a3a3")430EntryAge.configure(font="TkFixedFont")431EntryAge.configure(foreground="#000000")432EntryAge.configure(insertbackground="black")433Label4 = tk.Label(Frame1)434Label4.place(relx=0.035, rely=0.341, height=21, width=44)435Label4.configure(background="#d9d9d9")436Label4.configure(disabledforeground="#a3a3a3")437Label4.configure(foreground="#000000")438Label4.configure(text='''Gender''')439 440LabelHM = tk.Label(Frame1)441LabelHM.place(relx=0.035, rely=0.488, height=21, width=26)442LabelHM.configure(background="#d9d9d9")443LabelHM.configure(disabledforeground="#a3a3a3")444LabelHM.configure(foreground="#000000")445LabelHM.configure(text='''HM''')446 447scaleTypeHM=tk.StringVar()448scaleTypeHM.set("Metre")449 450scaleOptionHM = tk.OptionMenu(Frame1, scaleTypeHM, "Metre", "CM","Inch","ft")451scaleOptionHM.place(relx=0.211, rely=0.488,height=20, relwidth=0.250)452scaleOptionHM.configure(border=0)453EntryHMVar=tk.StringVar() 454EntryHM = tk.Entry(Frame1)455EntryHM.place(relx=0.52, rely=0.488,height=20, relwidth=0.150)456EntryHM.configure(background="white")457EntryHM.configure(disabledforeground="#a3a3a3")458EntryHM.configure(font="TkFixedFont")459EntryHM.configure(foreground="#000000")460EntryHM.configure(insertbackground="black")461LabelHC = tk.Label(Frame1)462LabelHC.place(relx=0.035, rely=0.634, height=21, width=26)463LabelHC.configure(activebackground="#f9f9f9")464LabelHC.configure(activeforeground="black")465LabelHC.configure(background="#d9d9d9")466LabelHC.configure(disabledforeground="#a3a3a3")467LabelHC.configure(foreground="#000000")468LabelHC.configure(highlightbackground="#d9d9d9")469LabelHC.configure(highlightcolor="black")470LabelHC.configure(text='''HC''')471 472scaleTypeHC=tk.StringVar()473scaleTypeHC.set("CM")474 475scaleOptionHC = tk.OptionMenu(Frame1, scaleTypeHC, "Metre", "CM","Inch","ft")476scaleOptionHC.place(relx=0.211, rely=0.634,height=20, relwidth=0.250)477scaleOptionHC.configure(border=0)478 479 480EntryHC = tk.Entry(Frame1)481EntryHC.place(relx=0.52, rely=0.634,height=20, relwidth=0.150)482EntryHC.configure(background="white")483EntryHC.configure(disabledforeground="#a3a3a3")484EntryHC.configure(font="TkFixedFont")485EntryHC.configure(foreground="#000000")486EntryHC.configure(highlightbackground="#d9d9d9")487EntryHC.configure(highlightcolor="black")488EntryHC.configure(insertbackground="black")489EntryHC.configure(selectbackground="#c4c4c4")490EntryHC.configure(selectforeground="black")491genderVar=tk.StringVar()492genderVar.set("Male")493RadioMale = tk.Radiobutton(Frame1)494RadioMale.place(relx=0.246, rely=0.341, relheight=0.122495 , relwidth=0.204)496RadioMale.configure(activebackground="#ececec")497RadioMale.configure(activeforeground="#000000")498RadioMale.configure(background="#d9d9d9")499#RadioMale.configure()500RadioMale.configure(disabledforeground="#a3a3a3")501RadioMale.configure(foreground="#000000")502RadioMale.configure(highlightbackground="#d9d9d9")503RadioMale.configure(highlightcolor="black")504RadioMale.configure(justify='left')505RadioMale.configure(text='''Male''')506RadioMale.configure(value="Male")507RadioMale.configure(variable=genderVar)508 509 510RadioFemale = tk.Radiobutton(Frame1)511RadioFemale.place(relx=0.456, rely=0.341, relheight=0.122512 , relwidth=0.204)513RadioFemale.configure(activebackground="#ececec")514RadioFemale.configure(activeforeground="#000000")515RadioFemale.configure(background="#d9d9d9")516RadioFemale.configure(disabledforeground="#a3a3a3")517RadioFemale.configure(foreground="#000000")518RadioFemale.configure(highlightbackground="#d9d9d9")519RadioFemale.configure(highlightcolor="black")520RadioFemale.configure(justify='left')521RadioFemale.configure(text='''Female''')522RadioFemale.configure(value="Female")523RadioFemale.configure(variable=genderVar)524ButtonSubmit = tk.Button(Frame1)525ButtonSubmit.place(relx=0.456, rely=0.78, height=24, width=47)526ButtonSubmit.configure(activebackground="#ececec")527ButtonSubmit.configure(activeforeground="#000000")528ButtonSubmit.configure(background="#d9d9d9")529ButtonSubmit.configure(disabledforeground="#a3a3a3")530ButtonSubmit.configure(foreground="#000000")531ButtonSubmit.configure(highlightbackground="#d9d9d9")532ButtonSubmit.configure(highlightcolor="black")533ButtonSubmit.configure(pady="0")534ButtonSubmit.configure(text='''Submit''')535ButtonSubmit.bind("<Button-1>", on_Click)536Frame2 = tk.Frame(top)537Frame2.place(relx=0.52, rely=0.089, relheight=0.456, relwidth=0.435)538Frame2.configure(relief='groove')539Frame2.configure(borderwidth="2")540Frame2.configure(relief="groove")541Frame2.configure(background="#d9d9d9")542Label1_7 = tk.Label(Frame2)543Label1_7.place(relx=0.09, rely=0.049, height=21, width=230)544Label1_7.configure(activebackground="#f9f9f9")545Label1_7.configure(activeforeground="black")546Label1_7.configure(background="#d9d9d9")547Label1_7.configure(disabledforeground="#a3a3a3")548Label1_7.configure(foreground="#000000")549Label1_7.configure(highlightbackground="#d9d9d9")550Label1_7.configure(highlightcolor="black")551Label1_7.configure(font="10")552Label1_7.configure(text='''Respondent's Individual Analysis''')553#def IndividualDataDisplay(Frame2,IndividualData):554# LabelName=tk.Label(Frame2)555# LabelName.place(relx=0.082, rely=0.195, height=21, width=38)556# LabelName.configure(text="Name :"+IndividualData["Name"])557# 558Label2_8 = tk.Label(Frame2)559Label2_8.place(relx=0.082, rely=0.195, height=21, width=38)560Label2_8.configure(activebackground="#f9f9f9")561Label2_8.configure(activeforeground="black")562Label2_8.configure(background="#d9d9d9")563Label2_8.configure(disabledforeground="#a3a3a3")564Label2_8.configure(foreground="#000000")565Label2_8.configure(highlightbackground="#d9d9d9")566Label2_8.configure(highlightcolor="black")567Label2_8.configure(text='''Name''')568DisplayNameVar=tk.StringVar()569DisplayNameVar.set("")570DisplayName = tk.Label(Frame2)571DisplayName.place(relx=0.408, rely=0.195, height=21, width=84)572DisplayName.configure(background="#d9d9d9")573DisplayName.configure(disabledforeground="#a3a3a3")574DisplayName.configure(foreground="#000000")575DisplayName.configure(textvariable=DisplayNameVar)576Label2_9 = tk.Label(Frame2)577Label2_9.place(relx=0.082, rely=0.293, height=21, width=38)578Label2_9.configure(activebackground="#f9f9f9")579Label2_9.configure(activeforeground="black")580Label2_9.configure(background="#d9d9d9")581Label2_9.configure(disabledforeground="#a3a3a3")582Label2_9.configure(foreground="#000000")583Label2_9.configure(highlightbackground="#d9d9d9")584Label2_9.configure(highlightcolor="black")585Label2_9.configure(text='''Gender''')586DisplayGenderVar=tk.StringVar()587DisplayGenderVar.set("")588DisplayGender = tk.Label(Frame2)589DisplayGender.place(relx=0.408, rely=0.293, height=21, width=90)590DisplayGender.configure(activebackground="#f9f9f9")591DisplayGender.configure(activeforeground="black")592DisplayGender.configure(background="#d9d9d9")593DisplayGender.configure(disabledforeground="#a3a3a3")594DisplayGender.configure(foreground="#000000")595DisplayGender.configure(highlightbackground="#d9d9d9")596DisplayGender.configure(highlightcolor="black")597DisplayGender.configure(textvariable=DisplayGenderVar)598Label2_9 = tk.Label(Frame2)599Label2_9.place(relx=0.082, rely=0.39, height=21, width=50)600Label2_9.configure(activebackground="#f9f9f9")601Label2_9.configure(activeforeground="black")602Label2_9.configure(background="#d9d9d9")603Label2_9.configure(disabledforeground="#a3a3a3")604Label2_9.configure(foreground="#000000")605Label2_9.configure(highlightbackground="#d9d9d9")606Label2_9.configure(highlightcolor="black")607Label2_9.configure(text='''Age Grp''')608DisplayAgeGrpVar=tk.StringVar()609DisplayAgeGrpVar.set("")610DisplayAgeGrp = tk.Label(Frame2)611DisplayAgeGrp.place(relx=0.408, rely=0.39, height=21, width=90)612DisplayAgeGrp.configure(activebackground="#f9f9f9")613DisplayAgeGrp.configure(activeforeground="black")614DisplayAgeGrp.configure(background="#d9d9d9")615DisplayAgeGrp.configure(disabledforeground="#a3a3a3")616DisplayAgeGrp.configure(foreground="#000000")617DisplayAgeGrp.configure(highlightbackground="#d9d9d9")618DisplayAgeGrp.configure(highlightcolor="black")619DisplayAgeGrp.configure(textvariable=DisplayAgeGrpVar)620Label2_9 = tk.Label(Frame2)621Label2_9.place(relx=0.082, rely=0.488, height=21, width=38)622Label2_9.configure(activebackground="#f9f9f9")623Label2_9.configure(activeforeground="black")624Label2_9.configure(background="#d9d9d9")625Label2_9.configure(disabledforeground="#a3a3a3")626Label2_9.configure(foreground="#000000")627Label2_9.configure(highlightbackground="#d9d9d9")628Label2_9.configure(highlightcolor="black")629Label2_9.configure(text='''BAI''')630DisplayABIVar=tk.StringVar()631DisplayABIVar.set("")632DisplayABI = tk.Label(Frame2)633DisplayABI.place(relx=0.408, rely=0.488, height=21, width=84)634DisplayABI.configure(activebackground="#f9f9f9")635DisplayABI.configure(activeforeground="black")636DisplayABI.configure(background="#d9d9d9")637DisplayABI.configure(disabledforeground="#a3a3a3")638DisplayABI.configure(foreground="#000000")639DisplayABI.configure(highlightbackground="#d9d9d9")640DisplayABI.configure(highlightcolor="black")641DisplayABI.configure(textvariable=DisplayABIVar)642# Name location643#Label2_8.place(relx=0.082, rely=0.195, height=21, width=38)644#Age Location645#Label2_9.place(relx=0.082, rely=0.39, height=21, width=98)646#ABI Location647#Label2_9.place(relx=0.082, rely=0.488, height=21, width=98)648Label2_10 = tk.Label(Frame2)649Label2_10.place(relx=0.082, rely=0.585, height=21, width=38)650Label2_10.configure(activebackground="#f9f9f9")651Label2_10.configure(activeforeground="black")652Label2_10.configure(background="#d9d9d9")653Label2_10.configure(disabledforeground="#a3a3a3")654Label2_10.configure(foreground="#000000")655Label2_10.configure(highlightbackground="#d9d9d9")656Label2_10.configure(highlightcolor="black")657Label2_10.configure(text='''Class''')658DisplayClassVar=tk.StringVar()659DisplayClassVar.set("")660DisplayClass = tk.Label(Frame2)661DisplayClass.place(relx=0.49, rely=0.585, height=21)662DisplayClass.configure(activebackground="#f9f9f9")663DisplayClass.configure(activeforeground="black")664DisplayClass.configure(background="#d9d9d9")665DisplayClass.configure(disabledforeground="#a3a3a3")666DisplayClass.configure(foreground="#000000")667DisplayClass.configure(highlightbackground="#d9d9d9")668DisplayClass.configure(highlightcolor="black")669DisplayClass.configure(textvariable=DisplayClassVar)670Frame3 = tk.Frame(top)671#Frame3.place(relx=0.033, rely=0.556, relheight=0.433, relwidth=0.925)672Frame3.place(relx=0.033, rely=0.556, relheight=0.433, relwidth=0.925)673Frame3.configure(relief='groove')674Frame3.configure(borderwidth="2")675Frame3.configure(relief="groove")676Frame3.configure(background="#d9d9d9")677f2 = tk.Frame(Frame3,height=100,width=300,bg='#d9d9d9')678f3 = tk.Frame(Frame3,height=100,width=300,bg='#d9d9d9')679f4 = tk.Frame(Frame3,height=100,width=300,bg='#d9d9d9')680f5 = tk.Frame(Frame3,bg='#d9d9d9')681f6 = tk.Frame(Frame3,bg='#d9d9d9')682f7 = tk.Frame(Frame3,bg='#d9d9d9')683 684 685# #f2.grid_propagate(0)686f2.grid(row=1, column=0,sticky="nsew")687f3.grid(row=1, column=1,sticky="nsew")688f4.grid(row=1, column=2,sticky="nsew")689f5.grid(row=0, column=0,sticky="nsew")690f6.grid(row=0, column=1,sticky="nsew")691f7.grid(row=0, column=2,sticky="nsew")692OverAllTextVar=tk.StringVar()693MaleTextVar=tk.StringVar()694FemaleTextVar=tk.StringVar()695 696 #tk.Label(f1, text=word, bg='#1A5266', fg="white",font="Times 16 bold",anchor="e").grid()697 #tk.Label(f2, text="FRAME 2",fg="black",bg='#effbfe', width=20,font="Helvetica 16",anchor="e").grid()698tk.Message(f2,textvariable=OverAllTextVar,bg='#d9d9d9', anchor="e").grid()699tk.Message(f3,textvariable=MaleTextVar,bg='#d9d9d9').grid()700tk.Message(f4,textvariable=FemaleTextVar,bg='#d9d9d9', anchor="e").grid()701tk.Label(f5,text="Overall Summary",fg="black",bg='#d9d9d9',font="Times 14").grid()702tk.Label(f6,text="Male Summary",fg="black",bg='#d9d9d9',font="Times 14").grid()703tk.Label(f7,text="Female Summary",fg="black",bg='#d9d9d9',font="Times 14").grid()704Button2 = tk.Button(top)705Button2.place(relx=0.456, rely=0.93, height=24)706Button2.configure(activebackground="#ececec")707Button2.configure(activeforeground="#000000")708Button2.configure(background="#d9d9d9")709Button2.configure(disabledforeground="#a3a3a3")710Button2.configure(foreground="#000000")711Button2.configure(highlightbackground="#d9d9d9")712Button2.configure(highlightcolor="black")713Button2.configure(pady="0")714Button2.configure(command=Data_summary)715Button2.configure(text='''Display Summary''')716#Display_Window(Frame3)717Data_summary()718top.protocol("WM_DELETE_WINDOW",Close_window)...
urls.py
Source:urls.py
1# Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved2from django.conf.urls import patterns, url, include3urlpatterns = patterns(4 "iondb.rundb.configure",5 url(r"^$", "views.configure", name="configure"),6 url(r"^about/$", "views.configure_about", name="configure_about"),7 url(r"^ionreporter/$", "views.configure_ionreporter", name="configure_ionreporter"),8 url(r"^account/$", "views.configure_account", name="configure_account"),9 url(10 r"^ampliseq/downloads/$",11 "views.configure_ampliseq_download",12 name="configure_ampliseq_download",13 ),14 url(15 r"^ampliseq/logout/$",16 "views.configure_ampliseq_logout",17 name="configure_ampliseq_logout",18 ),19 url(20 r"^ampliseq/getGridData/$",21 "views.configure_ampliseq_getGridData",22 name="configure_ampliseq_getGridData",23 ),24 url(r"^ampliseq/$", "views.configure_ampliseq", name="configure_ampliseq"),25 url(r"^plugins/$", "views.configure_plugins", name="configure_plugins"),26 url(r"^mesh/$", "views.configure_mesh", name="configure_mesh"),27 url(r"^mesh/link/$", "views.link_mesh_node", name="link_mesh_node"),28 url(29 r"^mesh/delete/(?P<pk>\d+)/$", "views.delete_mesh_node", name="delete_mesh_node"30 ),31 url(32 r"^plugins/plugin/install/$",33 "views.configure_plugins_plugin_install",34 name="configure_plugins_plugin_install",35 ),36 url(37 r"^plugins/plugin/(?P<pk>\d+)/configure/(?P<action>\w+)/$",38 "views.configure_plugins_plugin_configure",39 name="configure_plugins_plugin_configure",40 ),41 url(42 r"^plugins/plugin/(?P<pk>\d+)/configure/(?P<action>\w+)/pluginMedia/(?P<path>.*)$",43 "views.configure_plugins_pluginmedia",44 name="configure_plugins_pluginmedia",45 ),46 url(47 r"^plugins/plugin/(?P<pk>\d+)/uninstall/$",48 "views.configure_plugins_plugin_uninstall",49 name="configure_plugins_plugin_uninstall",50 ),51 url(52 r"^plugins/plugin/(?P<pk>\d+)/upgrade/$",53 "views.configure_plugins_plugin_upgrade",54 name="configure_plugins_plugin_upgrade",55 ),56 url(57 r"^plugins/plugin/(?P<pk>\d+)/(?P<version>[^/]+)/install_to_version/$",58 "views.configure_plugins_plugin_install_to_version",59 name="configure_plugins_plugin_install_to_version",60 ),61 url(62 r"^plugins/plugin/(?P<pk>\d+)/usage/$",63 "views.configure_plugins_plugin_usage",64 name="configure_plugins_plugin_usage",65 ),66 url(67 r"^plugins/plugin/upload/zip/$",68 "views.configure_plugins_plugin_zip_upload",69 name="configure_plugins_plugin_zip_upload",70 ),71 url(72 r"^plugins/plugin/enable/(\d+)/(\d)$",73 "views.configure_plugins_plugin_enable",74 name="configure_plugins_plugin_enable",75 ),76 url(77 r"^plugins/plugin/defaultSelected/(\d+)/(\d)$",78 "views.configure_plugins_plugin_default_selected",79 name="configure_plugins_plugin_default_selected",80 ),81 url(82 r"^plugins/publisher/install/$",83 "views.configure_publisher_install",84 name="configure_publisher_install",85 ),86 url(r"^references/$", "views.configure_references", name="configure_references"),87 url(r"^references/tf/$", "views.references_TF_edit", name="references_TF_edit"),88 url(89 r"^references/tf/(\d+)$", "views.references_TF_edit", name="references_TF_edit"90 ),91 url(92 r"^references/tf/(\d+)/delete/$",93 "views.references_TF_delete",94 name="references_TF_delete",95 ),96 url(97 r"^references/genome/download/$",98 "genomes.download_genome",99 name="references_genome_download",100 ),101 url(102 r"^references/genome/add/$",103 "genomes.add_custom_genome",104 name="add_custom_genome",105 ),106 url(107 r"^references/genome/upload/$",108 "genomes.file_upload",109 name="references_genome_file_upload",110 ),111 url(112 r"^references/genome/edit/(\w+)$",113 "genomes.edit_genome",114 name="references_genome_edit",115 ),116 url(117 r"^references/genome/delete/(\d+)$",118 "genomes.delete_genome",119 name="references_genome_delete",120 ),121 url(122 r"^references/genome/rebuild/(?P<reference_id>\w+)$",123 "genomes.start_index_rebuild",124 name="references_genome_start_index_rebuild",125 ),126 url(127 r"^references/genome/status/(\d+)$",128 "genomes.genome_status",129 name="references_genome_status",130 ),131 url(132 r"^references/genome/install_bedfiles/$",133 "genomes.start_install_bedfiles",134 name="start_install_bedfiles",135 ),136 url(137 r"^references/genome/install_annotationfiles/$",138 "genomes.start_install_annotationfiles",139 name="start_install_annotationfiles",140 ),141 url(142 r"^references/barcodeset/$",143 "views.references_barcodeset_add",144 name="references_barcodeset_add",145 ),146 url(147 r"^references/barcodeset/(?P<barcodesetid>\d+)/$",148 "views.references_barcodeset",149 name="references_barcodeset",150 ),151 url(152 r"^references/barcodeset/(?P<barcodesetid>\d+)/delete/$",153 "views.references_barcodeset_delete",154 name="references_barcodeset_delete",155 ),156 url(157 r"^references/barcodeset/(?P<barcodesetid>\d+)/csv/$",158 "views.reference_barcodeset_csv",159 name="references_barcodeset_csv",160 ),161 url(162 r"^references/barcodeset/(?P<barcodesetid>\d+)/barcode/add/$",163 "views.references_barcode_add",164 name="references_barcode_add",165 ),166 url(167 r"^references/barcodeset/(?P<barcodesetid>\d+)/barcode/(?P<pk>\d+)/$",168 "views.references_barcode_edit",169 name="references_barcode_edit",170 ),171 url(172 r"^references/barcodeset/(?P<barcodesetid>\d+)/barcode/(?P<pk>[\d,]+)/delete/$",173 "views.references_barcode_delete",174 name="references_barcode_delete",175 ),176 url(r"^services/$", "views.configure_services", name="configure_services"),177 url(178 r"^services/telemetry_services_toggle$",179 "views.configure_telemetry_services_toggle",180 name="configure_telemetry_services_toggle",181 ),182 url(r"^services/cache/$", "views.cache_status", name="cache_status"),183 url(r"^configure/$", "views.configure_configure", name="configure_configure"),184 url(r"^configure/editemail/(\d+)?$", "views.edit_email", name="edit_email"),185 url(r"^configure/deleteemail/(\d+)?$", "views.delete_email", name="delete_email"),186 url(187 r"^configure/auto_detect_timezone/$",188 "views.auto_detect_timezone",189 name="auto_detect_timezone",190 ),191 url(192 r"^configure/get_all_cities/(?P<zone>\w+)/$",193 "views.get_all_cities",194 name="get_all_cities",195 ),196 url(r"^configure/get_avail_mnts/(?P<ip>.*)/$", "views.get_avail_mnts"),197 url(198 r"^configure/get_avail_mnts/([0-2]?\d{0,2}\.){3}([0-2]?\d{0,2})$/",199 "views.get_avail_mnts",200 ),201 url(r"^configure/add_nas_storage/", "views.add_nas_storage"),202 url(r"^configure/get_current_mnts/", "views.get_current_mnts"),203 url(r"^configure/remove_nas_storage/", "views.remove_nas_storage"),204 url(r"^configure/get_nas_devices/", "views.get_nas_devices"),205 url(r"^configure/check_nas_perms/", "views.check_nas_perms"),206 url(r"^newupdates/$", "views.offcycle_updates", name="offcycle_updates"),207 url(208 r"^newupdates/(?P<offcycle_type>\w+)/$",209 "views.offcycle_updates",210 name="offcycle_updates",211 ),212 url(213 r"^newupdates/product/(.+)/(.+)/$",214 "views.offcycle_updates_install_product",215 name="update_product",216 ),217 url(218 r"^newupdates/package/(.+)/(.+)/$",219 "views.offcycle_updates_install_package",220 name="update_package",221 ),222 url(223 r"^newupdates/offline/bundle/$",224 "views.configure_offline_bundle",225 name="configure_offline_bundle",226 ),227 url(228 r"^newupdates/offline/bundle/upload/$",229 "views.configure_offline_bundle_upload",230 name="configure_offline_bundle_upload",231 ),232 url(233 r"^newupdates/offline/offcyle/install/$",234 "views.configure_offline_install",235 name="configure_offline_install",236 ),237 url(238 r"^services/controljob/(\d+)/((?:term)|(?:stop)|(?:cont))$",239 "views.control_job",240 name="control_job",241 ),242 url(r"^chips/$", "chips.showpage", name="configure_instrument_stats"),243 url(r"^info/$", "views.configure_system_stats", name="configure_system_stats"),244 url(245 r"^info/data$",246 "views.configure_system_stats_data",247 name="configure_system_stats_data",248 ),249 url(250 r"^info/SSA.zip",251 "views.system_support_archive",252 name="configure_support_archive",253 ),254 url(r"^raid_info/(\d+)/$", "views.raid_info"),255 url(256 r"^services/raid_info/refresh/$",257 "views.raid_info_refresh",258 name="raid_info_refresh",259 ),260 url(r"^timezone/$", "util.readTimezone"),261 url(r"^services/queueStat/$", "views.queueStatus"),262 url(r"^services/jobStat/(\d+)/$", "views.jobStatus"),263 url(r"^services/sgejob/(\d+)/$", "views.jobDetails"),264 url(265 r"^services/cluster_info/refresh/$",266 "views.cluster_info_refresh",267 name="cluster_info_refresh",268 ),269 url(270 r"^services/cluster_info/log/(?P<pk>\d+)/$",271 "views.cluster_info_log",272 name="cluster_info_log",273 ),274 url(275 r"^services/cluster_info/history/$",276 "views.cluster_info_history",277 name="cluster_info_history",278 ),279 url(280 r"^services/cluster_ctrl/(?P<name>\w+)/(?P<action>\w+)/$",281 "views.cluster_ctrl",282 name="cluster_ctrl",283 ),284 url(285 r"^services/torrent_nas_section/$",286 "views.torrent_nas_section",287 name="torrent_nas_section",288 ),289 (r"^getZip/(.+)$", "chips.getChipZip"),290 (r"^getChipLog/(.+)$", "chips.getChipLog"),291 (r"^getChipPdf/(.+)$", "chips.getChipPdf"),292 (r"^getProtonDiags/(.+)$", "chips.getProtonDiags"),293 url(294 r"^analysisargs/$",295 "views.configure_analysisargs",296 name="configure_analysisargs",297 ),298 url(299 r"^analysisargs/(?P<pk>\d+)/(?P<action>\w+)$",300 "views.configure_analysisargs_action",301 name="configure_analysisargs_action",302 ),...
test_param_parser.py
Source:test_param_parser.py
1from poroelastic.param_parser import *2import poroelastic as poro3import dolfin as df4import numpy as np5import pytest6import os7import configparser8CONFTEST = """\n[Simulation]9sim = sanity_check10solver = direct11debug = 012[Units]13s = 114m = 115Pa = 116mmHg = 133.322365 * Pa17kPa = 1000 * Pa18kg = 1 * Pa*m*s**219[Parameter]20N = 121TOL = 1e-722rho = 1000 * kg/m**323K = 1e-7 * m**2/Pa/s24phi = 0.325beta = 0.226qi = 10.0 * m**3/s27qo = 0.0 * m**3/s28tf = 1.0 * s29dt = 5e-2 * s30theta = 0.531[Material]32material = "isotropic exponential form"33a = 1.034D1 = 2.035D2 = 0.236D3 = 2.037Qi1 = 1.038Qi2 = 0.539Qi3 = 1.0"""40@pytest.fixture41def test_configure_file():42 loc_config = '/tmp/config.cfg'43 config = open(loc_config, 'w+')44 config.write(CONFTEST)45 config.close()46 return loc_config47 #assert config.read() == CONFTEST48# better use tempfile so it is not user set directory?49def test_get_params(test_configure_file):50 configure = configparser.ConfigParser()51 configure.read('/tmp/config.cfg')52 configure.sections()53 subdictionaries = []54 #Check for completeness of sectionsxs55 for section_name in configure.sections():56 #section = configure[section_name]57 subdictionaries.append(section_name)58 #figure out if you can make an assert?59 #params = poro.ParamParser()60 #print(p)61 for candidate in subdictionaries:62 print('{:<12}: {}'.format(candidate, configure.has_section(candidate)))63 #testing whether expected keys are present64 #N_key = 'N' in configure['Parameter']65 #for key in configure['Parameter']:66 #if key in configure['Parameter'] == True:67 #testing whether expected keys are present68 #N_key = 'N' in configure['Parameter']69 #for key in configure['Parameter']:70 #if key in configure['Parameter']:71 #print('{:<12}: {}'.format(key, configure.has_option(candidate,key)))72 #else:73 #print('{} is not in \'Parameters\''.format(key))74def test_get_sim_section(test_configure_file):75 configure = configparser.ConfigParser()76 configure.read('/tmp/config.cfg')77 #assert that all values expected for the keys in subdictionary 'Simulation' are true78 assert configure['Simulation']['sim'] == 'sanity_check'79 assert configure['Simulation']['solver'] == 'direct'80 assert configure['Simulation']['debug'] == '0'81def test_get_units_section(test_configure_file):82 configure = configparser.ConfigParser()83 configure.read('/tmp/config.cfg')84 #assert that all values expected for the keys in subdictionary 'Units' are true85 assert configure['Units']['s'] == '1'86 assert configure['Units']['m'] == '1'87 assert configure['Units']['Pa'] == '1'88 assert configure['Units']['mmHg'] == '133.322365 * Pa'89 assert configure['Units']['kPa'] == '1000 * Pa'90 assert configure['Units']['kg'] == '1 * Pa*m*s**2'91def test_get_param_section(test_configure_file):92 configure = configparser.ConfigParser()93 configure.read('/tmp/config.cfg')94 #assert that all values expected for the keys in subdictionary 'Parameter' are true95 assert configure['Parameter']['N'] == '1'96 assert configure['Parameter']['TOL'] == '1e-7'97 assert configure['Parameter']['rho'] == '1000 * kg/m**3'98 assert configure['Parameter']['K'] == '1e-7 * m**2/Pa/s'99 assert configure['Parameter']['phi'] =='0.3'100 assert configure['Parameter']['beta'] == '0.2'101 assert configure['Parameter']['qi'] == '10.0 * m**3/s'102 assert configure['Parameter']['qo'] == '0.0 * m**3/s'103 assert configure['Parameter']['tf'] == '1.0 * s'104 assert configure['Parameter']['dt'] == '5e-2 * s'105 assert configure['Parameter']['theta'] == '0.5'106def test_get_material_section(test_configure_file):107 configure = configparser.ConfigParser()108 configure.read('/tmp/config.cfg')109 #assert that all values expected for the keys in subdictionary 'Material' are true110 assert isinstance(configure['Material']['material'], str)111 assert configure['Material']['material'] == '"isotropic exponential form"'112 assert configure['Material']['a'] == '1.0'113 assert configure['Material']['D1'] == '2.0'114 assert configure['Material']['D2'] == '0.2'115 assert configure['Material']['D3'] == '2.0'116 assert configure['Material']['Qi1'] == '1.0'117 assert configure['Material']['Qi2'] == '0.5'118 assert configure['Material']['Qi3'] == '1.0'119def test_write_config():120 pass121def test_add_data():...
Using AI Code Generation
1import { configure } from 'storybook-root-decorator';2import { addDecorator } from '@storybook/react';3import { withKnobs } from '@storybook/addon-knobs';4import { withInfo } from '@storybook/addon-info';5import { withA11y } from '@storybook/addon-a11y';6import { withTests } from '@storybook/addon-jest';7import { withConsole } from '@storybook/addon-console';8import { withOptions } from '@storybook/addon-options';9import { withPropsTable } from 'storybook-addon-react-docgen';10import { withBackgrounds } from '@storybook/addon-backgrounds';11import { withViewport } from '@storybook/addon-viewport';12configure({13});14export const parameters = {15 options: {16 sidebar: {17 },18 },19 { name: 'twitter', value: '#00aced', default: true },20 { name: 'facebook', value: '#3b5998' },21 viewport: {22 viewports: {23 iphone5: {24 styles: {25 },26 },27 iphone6: {28 styles: {29 },30 },31 },
Using AI Code Generation
1import { configure } from 'storybook-root-decorator';2import { addDecorator, addParameters } from '@storybook/react';3import { withInfo } from '@storybook/addon-info';4import { withKnobs } from '@storybook/addon-knobs';5import { withA11y } from '@storybook/addon-a11y';6import { withThemesProvider } from 'storybook-addon-styled-component-theme';7import { withTests } from '@storybook/addon-jest';8import results from '../.jest-test-results.json';9import { lightTheme, darkTheme } from '../src/theme';10import '../src/styles/globalStyles';11import { withGlobalStyles } from './withGlobalStyles';12import { parameters } from './parameters';13const req = require.context('../src', true, /\.stories\.js$/);14configure(() => {15 addDecorator(withInfo);16 addDecorator(withKnobs);17 addDecorator(withA11y);18 addDecorator(withGlobalStyles);19 addDecorator(withTests({ results }));20 addDecorator(21 withThemesProvider([lightTheme, darkTheme], {
Using AI Code Generation
1import { configure } from 'storybook-root-decorator';2import { addDecorator } from '@storybook/react';3import { withKnobs } from '@storybook/addon-knobs';4import { withInfo } from '@storybook/addon-info';5import { withA11y } from '@storybook/addon-a11y';6import { withTests } from '@storybook/addon-jest';7import { withConsole } from '@storybook/addon-console';8import { withViewport } from '@storybook/addon-viewport';9import { withPerformance } from 'storybook-addon-performance';10import { withThemesProvider } from 'storybook-addon-styled-component-theme';11import { withCssResources } from '@storybook/addon-cssresources';12import { withContexts } from '@storybook/addon-contexts/react';13configure({14});15export const parameters = {16 viewport: {17 viewports: {18 extraSmall: {19 styles: {20 },21 },22 small: {23 styles: {24 },25 },26 medium: {27 styles: {28 },29 },30 large: {31 styles: {32 },33 },34 extraLarge: {35 styles: {36 },37 },38 },39 },40 a11y: {41 },42 {43 },44 {
Using AI Code Generation
1import { configure } from 'storybook-react-root-decorator';2import { addDecorator } from '@storybook/react';3import { withKnobs } from '@storybook/addon-knobs';4import { withA11y } from '@storybook/addon-a11y';5import { withInfo } from '@storybook/addon-info';6import { withTests } from '@storybook/addon-jest';7import results from '../.jest-test-results.json';8import { withViewport } from '@storybook/addon-viewport';9import { withConsole } from '@storybook/addon-console';10const req = require.context('../src/components', true, /\.stories\.js$/);11function loadStories() {12 req.keys().forEach(filename => req(filename));13}14configure({15 withTests({ results }),16});17import { configure } from '@storybook/react';18import { withConsole } from '@storybook/addon-console';19import { addDecorator } from '@storybook/react';20import { withTests } from '@storybook/addon-jest';21import results from '../.jest-test-results.json';22function loadStories() {23 require('../test');24}25configure(loadStories, module);26addDecorator((storyFn, context) => withConsole()(storyFn)(context));27addDecorator(withTests({ results }));28const path = require('path');29const SRC_DIR = path.resolve(__dirname, '../src');30const STORIES_DIR = path.resolve(__dirname, '../test');31const STORIES_FILE = path.resolve(__dirname, '../test.js');32module.exports = (baseConfig, env, config) => {33 config.module.rules.push({34 loaders: [require.resolve('@storybook/addon-storysource/loader')],35 });36 config.module.rules.push({37 loaders: [require.resolve('@storybook/addon-storysource/loader')],38 });39 config.module.rules.push({
Using AI Code Generation
1const { configure } = require('@storybook/react');2configure(() => {3 require('./stories');4}, module);5import { addDecorator } from '@storybook/react';6import { withInfo } from '@storybook/addon-info';7addDecorator(withInfo);8import { addParameters } from '@storybook/react';9addParameters({10 info: {11 },12});13import { addDecorator } from '@storybook/react';14import { withInfo } from '@storybook/addon-info';15addDecorator(withInfo);16import { addParameters } from '@storybook/react';17addParameters({18 info: {19 },20});21import { addDecorator } from '@storybook/react';22import { withInfo } from '@storybook/addon-info';23addDecorator(withInfo);24import { addParameters } from '@storybook/react';25addParameters({26 info: {27 },28});29import { addDecorator } from '@storybook/react';30import { withInfo } from '@storybook/addon-info';31addDecorator(withInfo);32import { addParameters } from '@storybook/react';33addParameters({34 info: {35 },36});37import { addDecorator } from '@storybook/react';38import { withInfo } from '@storybook/addon-info';39addDecorator(withInfo);40import { addParameters } from '@storybook/react';41addParameters({42 info: {
Using AI Code Generation
1import configure from 'storybook-root-decorator';2configure({3 style: {4 },5});6import { addDecorator } from '@storybook/react';7import { withRootDecorator } from 'storybook-root-decorator';8addDecorator(withRootDecorator());9import { addDecorator } from '@storybook/react';10import { withRootDecorator } from 'storybook-root-decorator';11addDecorator(withRootDecorator());12import { addDecorator } from '@storybook/react';13import { withRootDecorator } from 'storybook-root-decorator';14addDecorator(withRootDecorator());15import { addDecorator } from '@storybook/react';16import { withRootDecorator } from 'storybook-root-decorator';17addDecorator(withRootDecorator());18import { addDecorator } from '@storybook/react';19import { withRootDecorator } from 'storybook-root-decorator';20addDecorator(withRootDecorator());21import { addDecorator } from '@storybook/react';22import { withRootDecorator } from 'storybook-root-decorator';23addDecorator(withRootDecorator());24import { addDecorator } from '@storybook/react';25import { withRootDecorator } from 'storybook-root-decorator';26addDecorator(withRootDecorator());27import { addDecorator } from '@storybook/react';28import { withRootDecorator } from 'storybook-root-decorator';29addDecorator(withRootDecorator());30import { addDecorator } from '@storybook/react';31import { withRootDecorator } from 'storybook-root-decorator';32addDecorator(withRootDecorator());33import { addDecorator } from '@storybook/react';34import { withRootDecorator } from 'storybook-root-decorator';35addDecorator(withRootDecorator());36import { addDecorator } from '@storybook/react';37import { withRootDecorator } from 'storybook-root-decor
Using AI Code Generation
1import { configure } from '@storybook/react';2import { withRootDecorator } from 'storybook-root-decorator';3configure(() => {4 require('./stories');5}, module);6export default withRootDecorator({7});8import { configure } from '@storybook/react';9import { withRootDecorator } from 'storybook-root-decorator';10configure(() => {11 require('../stories');12}, module);13export default withRootDecorator({14});15import React from 'react';16import { storiesOf } from '@storybook/react';17import { withRootDecorator } from 'storybook-root-decorator';18storiesOf('Welcome', module).add('to Storybook', () => <div>Storybook</div>);19export default withRootDecorator({20});21import React from 'react';22import { storiesOf } from '@storybook/react';23import { withRootDecorator } from 'storybook-root-decorator';24storiesOf('Welcome', module).add('to Storybook', () => <div>Storybook</div>);25export default withRootDecorator({26});27import React from 'react';28import { storiesOf } from '@storybook/react';29import { withRootDecorator } from 'storybook-root-decorator';30storiesOf('Welcome', module).add('to Storybook', () => <div>Storybook</div>);31export default withRootDecorator({32});33import React from 'react';34import { storiesOf } from '@storybook/react';35import { withRootDecorator } from 'storybook-root-decorator';36storiesOf('Welcome', module).add('to Storybook', () => <div>Storybook</div>);37export default withRootDecorator({38});39import React from 'react';40import { storiesOf } from '@storybook/react';41import { withRootDecorator } from 'storybook-root-decorator';42storiesOf('Welcome', module).add('to Storybook', () => <div>Storybook</div>);
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!