Would something like this do what you need? You'd effectively be creating your window in text, and then parsing it, though obviously you'd need to replace the actual function of each button by whatever you wanted it to do. Note that you don't actually need to name all the buttons (BB1, BB2 etc) in this example, but I've done so anyway:
(Alternatively you could just feed your options into a single List Box instead, which would be far less convoluted than the above, and wouldn't require any parsing at all. The only reason I've done it this way is that you don't know in advance how many boxes you're going to need - hence the 'for' loop.)
Increasingly I have had the need to create "dynamic content. Creating the content as a string works well. One approach is to define the window with usual syntax then edit it in a text editor replacing quotes with escaped sequences.
The problem I am now coming across is that I want to re-design some of these windows, and sometimes it can get a bit fiddly and frustrating. So I've just started to look at the feasibility of developing some functions to do the hard work. I've had some success, and thought I would share it in case it helps anyone else, or in case anyone has any other ideas: