The problem with this method is that you'll be more limited with your number of choice and/or their size. Another option is to have a switch for it.
Code:
screen choice(items):
style_prefix "choice"
if horizontalChoice is True:
hbox:
for i in items:
textbutton i.caption action i.action
else:
vbox:
for i in items:
textbutton i.caption action i.action
default horizontalChoice = True
By default you'll have the horizontal display, but at anytime in your code you can fall back to the vertical one with :
Code:
$ horizontalChoice = False
then return to the horizontal display with :
Code:
$ horizontalChoice = True
It provide more flexibility, instead of forcing you to adapt to the more limited size, so it's a better option.