def on_table_selected(self, evt): table = self.table_choice.Value if table == ui.TableComboBox.OTHER_TABLE: t = ui.get_other_table_from_user(self) if t is not None: self.table_choice.Items = self.table_choice.Items[:-1] + [t] + self.table_choice.Items[-1:] self.table_choice.Select(self.table_choice.Items.index(t)) else: self.table_choice.Select(0) return self.update_column_fields()
def on_y_table_selected(self, evt): table = self.y_table_choice.Value if table == ui.TableComboBox.OTHER_TABLE: t = ui.get_other_table_from_user(self) if t is not None: self.y_table_choice.Items = self.y_table_choice.Items[:-1] + [t] + self.y_table_choice.Items[-1:] self.y_table_choice.Select(self.y_table_choice.Items.index(t)) sel = self.x_table_choice.GetSelection() self.x_table_choice.Items = self.x_table_choice.Items[:-1] + [t] + self.x_table_choice.Items[-1:] self.x_table_choice.SetSelection(sel) else: self.y_table_choice.Select(0) return self.update_y_choices()
def UpdateMeasurementChoice(self, evt=None): ''' Handles the selection of a source table (per-image or per-object) from a choice box. The measurement choice box is populated with the names of numeric columns from the selected table. ''' table = self.sourceChoice.Value if table == TableComboBox.OTHER_TABLE: t = get_other_table_from_user(self) if t is not None: self.sourceChoice.Items = self.sourceChoice.Items[:-1] + [t] + self.sourceChoice.Items[-1:] self.sourceChoice.Select(self.sourceChoice.Items.index(t)) table = t else: self.sourceChoice.Select(0) return self.measurementsChoice.SetItems(get_non_blob_types_from_table(table)) self.measurementsChoice.Select(0) self.colorBar.ResetInterval() self.UpdatePlateMaps()