def _init_filter_frame(self): basic_x = 20 Label(self, text='E:', font=(MS_JH, 12)).place(x=basic_x, y=3) self.event_filter = FilteredObjectCombobox(self, setter=lambda obj: obj.name, getter=lambda obj: obj.e_id, width=16, justify=CENTER) self.event_filter.set_objects(self.events) self.event_filter.place(x=basic_x + 18, y=3) self.event_filter.bind( '<<ComboboxSelected>>', lambda x: (self.filter_manager.set_specific_condition( 'event_id', self.event_filter.get()), self.update_table()), add='+') self.event_filter.bind( '<Button-2>', lambda event: (open_updating_event_window( self, self.event_filter.selected_object, lambda: self. event_filter.set_objects(self.events)))) basic_x += 158 Label(self, text='C:', font=(MS_JH, 12)).place(x=basic_x, y=3) self.cost_filter = FilteredCombobox(self, width=6, justify=CENTER) self.cost_filter['values'] = DRAW_LOTS_COST self.cost_filter.place(x=basic_x + 20, y=3) self.cost_filter.bind( '<<ComboboxSelected>>', lambda x: (self.filter_manager.set_specific_condition( 'cost', self.cost_filter.get()), self.update_table())) basic_x += 90 Label(self, text='R:', font=(MS_JH, 12)).place(x=basic_x, y=3) self.rank_filter = IntFilteredCombobox(self, width=3, justify=CENTER) self.rank_filter['values'] = [5, 4, 3] self.rank_filter.place(x=basic_x + 20, y=3) self.rank_filter.bind( '<<ComboboxSelected>>', lambda x: (self.filter_manager.set_specific_condition( 'rank', self.rank_filter.get()), self.update_table())) basic_x = 342 Label(self, text='Total:', font=(MS_JH, 12)).place(x=basic_x, y=2) self.total_count = Label(self, font=(MS_JH, 12)) self.total_count.place(x=basic_x + 44, y=2) basic_x += 83 Label(self, text='SSR:', font=(MS_JH, 12)).place(x=basic_x, y=2) self.ssr_count = Label(self, font=(MS_JH, 10)) self.ssr_count.place(x=basic_x + 34, y=-3) self.ssr_ratio = Label(self, font=(MS_JH, 9)) self.ssr_ratio.place(x=basic_x + 44, y=13) basic_x += 80 Label(self, text='SR:', font=(MS_JH, 12)).place(x=basic_x, y=2) self.sr_count = Label(self, font=(MS_JH, 10)) self.sr_count.place(x=basic_x + 25, y=-3) self.sr_ratio = Label(self, font=(MS_JH, 9)) self.sr_ratio.place(x=basic_x + 35, y=13) basic_x += 78 Label(self, text='R:', font=(MS_JH, 12)).place(x=basic_x, y=2) self.r_count = Label(self, font=(MS_JH, 10)) self.r_count.place(x=basic_x + 16, y=-3) self.r_ratio = Label(self, font=(MS_JH, 9)) self.r_ratio.place(x=basic_x + 26, y=13) # 清空進行篩選的條件 button = Button(self, text="清空條件", width=7, font=(MS_JH, 11)) button.place(x=658, y=-1) button["command"] = self.clearing_filter