Hi
I have a dialog system where you make choices.
- Those choices are buttons (with regular text component)
- There are a variable number of choices/buttons (2-5). Unused buttons are disabled as required.
- The buttons are in a panel with a vertical layout group.
- The panel has a texture (speed bubble)
What I would like
- Have each button expand to the width of the largest text.
- Have the panel expand to the width of the buttons (so there is no extra space as shown in the screen shot below)
- Resize the panels height based on the number of buttons
I want to avoid this (extra white space after the longest line):

I’m unsure how to do this.
One attempt
- Vertical Layout Group on Panel. Expand Width not checked.
- Content Size Fitter on Panel set to Preferred.
- Each Btn has a Layout controller with the min width set.
Is anyone able to point me in the right direction here?
Thanks
