質問

Sorry if this is too noobish a question. Thank you for being patient...

I'm working on a .NET Winforms application in VS2010.

I want to hide/show groups of controls on the form based on which menustripitem is selected. Before you suggest a TabControl, let me clarify that I'm using a menustrip because the menu items need to be grouped.

It's gotten very messy... I'm currently making all the panels invisible and overlapping them. Based on which menustripitem is selected, I'm showing the panels. Moreover, this isn't working very well... even when I set visible = true from the code behind, nothing seems to happen for some panels... I don't know if the panels are under something else.

I'm sure this must be simple. How would you build a UI like this? What controls would you use?

役に立ちましたか?

解決

Sounds like time for a big UI overhaul. Organize related controls in user controls and show one of these, hide the others.

Maybe you can use an MDI, and merge menu items.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top