I am trying to create dropdown menu using the following code on Python.
pqrs = ['Segment1', 'Segment2', 'Segment3']
#Segment Criteria
Segment_selected = widgets.Text()
# print('=' * term_size.columns)
# print('\n' +"\033[1m" + 'Select a Segment criteria for Selecting HCP Universe' + "\033[0m")
# python code to run in jupyter notebook
from ipywidgets import interact, interactive, Layout
def lx(Segmentation):
Segment_selected.value = str(Segmentation)
int_widget = interactive(lx, Segmentation=pqrs,)
int_widget.children[0].layout = Layout(width='400px',height = '40px')
display(int_widget)
This is generating the following output: Code Output
Now, the problem is I want to show the complete text on the left side of the dropdown. It appears as "Segmentati..." in my case which I want it to be "Segmentation" in my case. But I am unable to do so.
Can you please help me?
