0

I have a config dialog that configures two different aspects of my application. As the two set of configurations are very similar, I decided to just use one set of controls for both. However, I like the aesthetics of TabControl (I tried RadioButton, but it makes the users feel like they are making a choice between the two aspects, rather than choosing to configure one). Can I make a "pseudo" TabControl that have the same content on both pages, i.e. one that works just like a RadioButton?

I also tried to hide the TabPages by resizing the TabControl, but it feels difficult to get the layout right (finding where the TabPage would be).

Imperishable Night
  • 1,503
  • 9
  • 19
  • Please, add more details, code ,examples, screens... something. This question is very unclear – Samvel Petrosov May 21 '17 at 19:54
  • It's unclear exactly what you want to achieve here, but you can create a user control with the contents you need, then add an instance of this user control to each tab page you want to show it on, – EventHorizon May 21 '17 at 20:02
  • @EventHorizon I suppose this will work, but a user control for each instance feels like too much for me. What I want is simply for the TabControl to work like a RadioButton, not automatically affecting any other controls on the form (only programmatically). – Imperishable Night May 21 '17 at 20:13
  • Like a group of checkboxes with appearance set to Button? With a little code you make make this work like radiobuttons. – EventHorizon May 21 '17 at 20:36
  • @EventHorizon Well, it still doesn't look quite like a TabControl, but it does feel like toggling a page rather than making a choice. Thanks! – Imperishable Night May 21 '17 at 21:16
  • You could simply iterate the controls in the SelectedIndexChanged event handler and change their Parent. – Hans Passant May 21 '17 at 21:48
  • @HansPassant That actually works! I also figured out that I can put all the controls in a Panel, so I only need to change Parent once. – Imperishable Night May 22 '17 at 00:49

0 Answers0