Button group layout

How do I change the layout of a button group from horizontal to vertical?

If you reduce the widht of the overall button group, the buttons will automatically flow vertically