How to generate a widget based on selecting an option from a dropdown menu? I have an example code is given below?
from ipywidgets import * x = Dropdown(options=['a', 'b']) #y = Dropdown(options=['1', '2']) x.observe(change_x, 'value') HBox([x])
For example, based on selecting 'a' It should create and display a second drop-down menu 'y' and on selecting 'b' It should create and display a text box.
Thank you.
1.4m articles
1.4m replys
5 comments
57.0k users