def list_tasks(): # get the input from the entry # get the matrix memeber or other to search for # pass to the class method and return a list to display # task owner wants to be global, searchable on the contacts page global task_frame_count user_triage = list_task_entry.get() task_owner_or_owners = list_task_lead_entry.get() list_of_tasks = Tasks.get_tasks_by_triage(task_owner_or_owners, user_triage) # clear the frames generated previosey if len(task_frame_count) != 0: try: for _ in task_frame_count: _.grid_forget() _.destroy() except: print('tcl error no frames to delete') # get the projects title and ID from the task, display it after the task tilte # clear the elements in the tree view #loop through all the tasks and add the to the tree view, task_frame_count = [] for i, task in enumerate(list_of_tasks): i_int = i i = task_display_frame(task, display_task_frame, 'head_only') i.grid(row=i_int, column=0) task_frame_count.append(i) #update the scroll bar canvas_panned_left.configure( scrollregion=canvas_panned_left.bbox('all'))