Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -32,12 +32,12 @@ button3 = pn.widgets.Button(icon='settings', icon_size='1.5em', name='Settings',
|
|
| 32 |
# Custom RadioButtonGroup widget
|
| 33 |
select = pn.widgets.RadioButtonGroup(value="⭐", options=["⭐", "🐘"], name='String', align='center')
|
| 34 |
|
| 35 |
-
#
|
| 36 |
def display_selected_value(event):
|
| 37 |
-
print(f"Selected value: {
|
| 38 |
|
| 39 |
-
# Attach the
|
| 40 |
-
select.
|
| 41 |
|
| 42 |
# Create a column layout for the buttons inside the toggleable sidebar
|
| 43 |
buttons = pn.Column(
|
|
|
|
| 32 |
# Custom RadioButtonGroup widget
|
| 33 |
select = pn.widgets.RadioButtonGroup(value="⭐", options=["⭐", "🐘"], name='String', align='center')
|
| 34 |
|
| 35 |
+
# Define a callback to display the selected value
|
| 36 |
def display_selected_value(event):
|
| 37 |
+
print(f"Selected value: {event.new}")
|
| 38 |
|
| 39 |
+
# Attach the callback to the value_change event of the RadioButtonGroup
|
| 40 |
+
select.param.watch(display_selected_value, 'value')
|
| 41 |
|
| 42 |
# Create a column layout for the buttons inside the toggleable sidebar
|
| 43 |
buttons = pn.Column(
|