def add_table_widget(self, table_data): html_widget = HTML(value=table_data) wi = Popup(children=[html_widget]) if ipy_old is True: wi.set_css('height', '300px') children = [i for i in self.tables_widget.children] children.append(wi) self.tables_widget.children = children
def create_case_widget(self): controller = self.controller if controller.ds is None: return case = self.case self.info = VBox() self.equations = VBox() self.log_gains = VBox() self.parameter_table = VBox() self.tolerances_table = VBox() self.bounding_box_table = VBox() calculate_pvals = Button(description='Determine values for the parameters') calculate_pvals.visible = False calculate_pvals.on_click(self.identify_parameters) if case.is_valid() is True and case.is_cyclical is False: if self.pvals is None: calculate_pvals.visible = True close_button = Button(description='Close Tab') close_button.on_click(self.close_widget) wi = Popup(children=[self.info, self.equations, self.log_gains, self.bounding_box_table, calculate_pvals, self.parameter_table, self.tolerances_table, close_button]) if ipy_old is True: wi.set_css('height', '400px') else: wi.width = '700px' self.update_display() subtitle = self.subtitle if subtitle != '': subtitle = ' (' + subtitle + ')' self.title = 'Case ' + self.case.case_number + subtitle controller.update_child(self.title, wi)