That works, but what if I don’t want to have a pn.pane inside of the pn.Row? It seems like I should be able to simplify this down to something like: pn.Row('Foo:',sizing_mode='stretch_width', width_policy='max', background='WhiteSmoke')
or pn.Column('Foo:', sizing_mode='stretch_width', width_policy='max', background='WhiteSmoke')
but this doesn’t appear to work.
If you pass a string to pn.Row it creates a pane which does not have sizing_mode passed to it. The pane can then be stretched afterwards, but this remove the elegance of what you are trying to do.
import panel as pn
pn.extension()
a = pn.Row('Foo:',sizing_mode='stretch_width', width_policy='max', background='WhiteSmoke')
a[0].sizing_mode = 'stretch_width'
a
Alternative you can change Row to panel like this: pn.panel('Foo:',sizing_mode='stretch_width', width_policy='max', background='WhiteSmoke')
aha! I figured it had to do with panes somehow. I think it should warn when I pass it something that its going to get ignored. It would be good if the docs page had this info too.