if one part of one form of our app has many views - let's say depending on a radio button selection some where else on that form - then sometimes using a TabControl with some tabPages can be easy and helpful to show different views based开发者_JAVA百科 on that selection. so I still would like to have that "multiple views" functionality but I do not want to use a TabPage.... what would be the best replacement for that?
As far as I know, you'll have to code such a control yourself if you desire a lot of functionality. For regular operations, however, you can use this control I found on CodeProject: Multipane Control.
You could just have a Panel
or something to define the area and then you could create one User control for each "view" that you want and then when the user selects a different radio button you just shows/hides the relevant user controls inside that Panel
.
Or if the "views" are very simple, maybe the User controls would be overkill and you could just have a GroupBox
for each view that you show/hide, but that can quickly create messy code if there are lots of event handlers etc.
精彩评论