tags:

views:

37

answers:

1

I am writing an application who's GUI changes depending on several conditions. I implemented this in Qt4 and internally used QStackWidget (basically, it's a series of controls, which only one can be visible each time).

I am currently using a TabControl - what are my alternatives in C#?

EDIT:

I wrote a Qt4 application which was using QStackWidget. Now I am re-writing the same application in C#. No code is shared, this is a different application.

A: 

I'm not aware of a built-in control that works like QStackWidget, but you could write a class that inherits Panel, keeps its child controls in an internal List, and tracks the "current" control. Add convenience methods like NextPage, PreviousPage, SetPage, etc., which take care of showing the desired child control and hiding the rest.

allonym
ok, but why not using a plain Control, instead of Panel?
elcuco
no special reason, it's just the control I like to inherit when I make containers. either way will work fine.
allonym