Clean way to display/hide a bunch of buttons based on a ComboBox selection
Posted
by John at CashCommons
on Stack Overflow
See other posts from Stack Overflow
or by John at CashCommons
Published on 2010-04-14T21:47:01Z
Indexed on
2010/04/14
21:53 UTC
Read the original article
Hit count: 271
I'm writing a standalone application in VB.NET using Visual Studio 2005.
I want to display/hide a bunch of Button
s based on the selected value of a ComboBox
. Each selection would have a different set of Button
s to display, and I'd like to have them arranged in a nice grid.
Driving a TabControl
with the ComboBox
value would be the kind of behavior I want, but I don't want it to look like a TabControl to the user because it might be confusing.
Is there a way to do this?
Basically, I'd like Selection1 of the ComboBox to show Buttons 1-4, Selection2 to show Buttons 5-11, Selection3 to show (maybe) Buttons 1, 3, 5, 6, and 8, etc., have them arranged nicely, and have the GUI show only the ComboBox and the buttons.
Thanks in advance as always!
© Stack Overflow or respective owner