Apr-20-2020, 08:53 PM
micseydel,
Thank you for your response. The only import that needs to be used for being able to run this is as follows:
1. jupyter
2. ipywidgets
3. python
Thank you for your response. The only import that needs to be used for being able to run this is as follows:
import ipywidgets as widgets from ipywidgets import VBox style = {'description_width': 'initial'} def input_tab(tab_list, tab_names_list): if len(tab_list) == len(tab_names_list): this_tab = Tab() this_tab.children = tab_list [this_tab.set_title(i, title) for i, title in enumerate(tab_names_list)] return this_tab else: raise ValueError('\n Input lists should be of the same size') def get_input_panel_num(): input_1 = widgets.Text(value='3000', description='Input-1', style=style) input_2 = widgets.Dropdown(options=['yes', 'no'], description='Select one', value='yes', disabled=False, style=style) input_3 = widgets.IntSlider(value=0, min=0, max=1, step=1, description='Input-3', orientation='horizontal', readout=True, style=style) input_list_num = [input_1, input_2, input_3] return input_list_num def get_input_panel_char(): input_a = widgets.Text(value='3000', description='Input-1', style=style) input_b = widgets.Dropdown(options=['yes', 'no'], description='Select one', value='yes', disabled=False, style=style) input_c = widgets.IntSlider(value=0, min=0, max=1, step=1, description='Input-3', orientation='horizontal', readout=True, style=style) input_list_char = [input_a, input_b, input_c] return input_list_char def create_master_tab(): tab_names = ["tab-1", "tab-2"] panel_num = VBox(get_input_panel_num()) panel_char = VBox(get_input_panel_char()) final = input_tab(tab_list=[panel_num, panel_char], tab_names_list=tab_names) return final demo = create_master_tab() demoI unfortunately don't know how to set up tldr is, so I will have to pass on that. As for the only required packages anyone needs to install in a virtual environment to be able to run these are:
1. jupyter
2. ipywidgets
3. python