I have now image objects as child, but I don't want to hardcode how many there are. I would like to have a row of button images corresponding to the gamepad buttons.
In case you want the simplest solution then i would probably suggest to use a List. Neil just recently added support for rgb images with the special text escape.
But that is of course not a row but instead a (single) column (no idea if a list can be turned to display multiple columns in only a single row, perhaps listview does ?).
So afaik that leaves you with a group with either a custom Layouthook or using a single row (and multiple columns) or a combination of both the hook and row/columns
However, do note that using dynamic objects is not something that is easily to implement with MUI. You would have to make sure you have a clear indication (beforehand) on how many buttons there will be in order to make sure they will fit in the current dimensions of the used class (or suffer the consequence of a bunch of redraws/resizes). Unfortunately that is how most of MUI works (preferred is that things can only be added at init stage).
On the other hand, using a group does allows for dynamic creation with MUIM_Group_InitChange (ADDMEMBER/REMEMBER) and MUIM_Group_ExitChange. Problem is that i do not have any experience with it to know if it is workable for your situation (nor am i able to assist atm).
Just some thoughts as a suggestion in the hope it offers enough for you to be able to continue. If someone else has a more clear train of thoughts (or even better an exampe) then please let them speak their mind
PS:
link to autodocs initchange.