Reputation: 35
These are the buttons that I'm trying to customize:
The code itself.
This is the result I want to get (edited by GIMP):
I want to keep these buttons stacked vertically (as shown in the edited image I made), but since I don't know much about CSS, I don't know how to do that. Any suggestion?
Upvotes: 1
Views: 1659
Reputation: 2708
As Bananach said, layout=widgets.Layout(width='100px')
will do it.
widgets.ToggleButtons(
options=['A','B', 'C'],
disabled=False,
button_style='info', # 'success', 'info', 'warning', 'danger' or ''
layout=widgets.Layout(width='100px')
# icons=['check'] * 3
)
Upvotes: 2
Reputation: 2311
I don't know how to do this explicitly, but if you pass layout=dict(width='200px')
to the ToggleButtons
constructor, the widget will automatically stack the buttons vertically to be able to fit them in the given width.
Upvotes: 0