.NET design of Radiobuttons "content"

I am trying to work out how to use radio buttons around the content of a panel (or other container) using Windows Forms.NET (C #) and keep the Visual Studio designer possible on the form / usercontrol that contains them.

What I really like is something like a TabControl where I can select pages programmatically against which the radio is checked, but without showing the actual tabs. The reason I am not using tabcontrol is because using the currently selected tab as input seems to be wrong.

The obvious solution is to just have a panel for each emitter and toggle them using visibility etc, but this is annoying to work with the Visual Studio designer as these panels will either be hidden underneath each other or not in the correct one positions (and the overall shape is not in the correct size, unless there is more space than one panel to be displayed at a time).

I seem to remember that Delphi has a PageControl parameter or something like that, which was basically a tabcontrol with no tab header.

It seems to me like this is a common situation, so I'm wondering: How would you set something like this?

0


source to share


3 answers


I guess I would just create a page control like this. Can't be too hard I guess (although design-time support is generally a little more complicated than you'd like sometimes ...)



0


source


I've always played around with the visibility function.



+1


source


You can design each panel as a custom control. This will give you design flexibility. Then, like everyone else, use visibility when you manipulate them programmatically.

0


source







All Articles