Resize buttons in panel if vertical scroll is necessary
Posted on 2009-04-13
I use a panel control with buttons I add at runtime as the 'main menu' navigation. Depending on the user, only 3 buttons (no scroll) or 17 buttons (need scroll) appear. So when there is 17 buttons, the panel adds the vertical scroll. But the buttons do not resize so then a horizontal scroll also is added. What I need it to do when the vertical scroll is added that the buttons resize so only a vertical scroll is present. I have tried both docking and anchoring; do I need to use another control...any help would be greatly appreciated.
Please let me know if more information is needed. Thanks in advance!