Swapping out a widget section in a Column layout

Hi @Jhsmit!

You don’t have to chop off the tittle manually, just use show_name=False:

self.col1 = pn.panel(self.param, show_name=False, parameters=['field1', 'number1'], widgets={'field1': pn.widgets.RadioButtonGroup})

You could also expand subobjects (see the User guide):

class W1(param.Parameterized):
    field1 = param.Selector(objects=['a1', 'a2', 'a3'], label='Field1')
    number1 = param.Number(3)

class W2(param.Parameterized):
    field2 = param.Selector(objects=['b1', 'b2', 'b3'], label='Field2')
    number2 = param.Number(5, bounds=(2, 10))

widgets_sets = [W1(name="opt1"), W2(name="opt2")]

class WidgetsSelector(param.Parameterized):
    
    select = param.ObjectSelector(default=widgets_sets[0], objects=widgets_sets)

widget_selector = WidgetsSelector()
app = pn.Column(
    "**Select an option to display a different set of widgets**",
    pn.Param(widget_selector.param, show_name=False, expand=True)
)
app.servable()

image

I guess that in that case you have to accept that you’re using the default mapping between Parameter and widget types.

Cheers!