☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

xxxButtonGroup automatic multiple row layout

Community Support
Vincent_LeDahu
Vincent_LeDahu

Hi,

Until bokeh v1.0.4, by using the following code:

from bokeh.io import output_file, show
from bokeh.layouts import column,row
from bokeh.models.widgets import Button, RadioButtonGroup, Select, Slider

output_file("layout_widgets.html")

# create some widgets
slider = Slider(start=0, end=10, value=1, step=.1, title="Slider")
button_group1 = RadioButtonGroup(labels=["Option {:d}".format(i+1) for i in range(10)], active=0)
select = Select(title="Option:", value="foo", options=["foo", "bar", "baz", "quux"])
button_1 = Button(label="Button 1")
button_2 = Button(label="Button 2")

slider2 = Slider(start=0, end=10, value=1, step=.1, title="Slider")
button_group2 = RadioButtonGroup(labels=["Option {:d}".format(i+101) for i in range(10)], active=0)
select2 = Select(title="Option:", value="foo", options=["foo", "bar", "baz", "quux"])
button_11 = Button(label="Button 1")
button_12 = Button(label="Button 2")
show(row(column(button_1, slider, button_group1, select, button_2, width=300),column(button_11,slider2,button_group2, select2,button_12,width=300)))

I got an automatic RadioButtonGroup layout on multiple rows depending to the width of the parent column like this(left part), now with bokeh version post 1.0.4, I get the right part:

Does it exist a way to get the same behavior in lastest bokeh versions ?
The only workaround I have found, is to create an upper metaRadioButtunGroup object embedding 4 (or more depending to column width) RadioButtonGroup and managing the routing of the events and so on. It is not simple and beautiful :wink:

Thank you by advance
BR
Vincent

⌁   Link to post
Bryan
Bryan

Hi @Vincent_LeDahu I am afraid I don’t have any great news to report. There was a huge push to re-work the Bokeh layout system since 1.4, and in general many things got much, much better as part of that. But a few things did not get better, and this is one of those things. I would suggest making a GitHub issue to discuss things on the tracker.

⌁   Link to post

End of archived discussion · Replies are disabled