|
|
User login
Feeds |
instead of multiple views can we have multiple containers ?
|
|||||
| Tue, 2005-02-01 15:29 | |
Forum posts: 1379
If you have a 1-1 mapping of view to container, it's easier to switch the view.
If you have a 1-n mapping of view to container, thats fine too, but when you "switch" container, your app will temporarly "disapear" (that is its client area will go transparent, and you will be able to see whats underneath, usually the menu) and then the new container will appear when you show it.
You can avoid that by creating the new container first, before destroying the old one.
However, more often than not, people use containers when they don't really need to - if you have one control which fills the entire view (say a list box) you DONT need a container. Containers (in this sence) are for so called compound controls - ones which contain more than one sub control (Think CountComponentControls and ComponentControl).
didster
Forum posts: 36
Unless you want to override some keys etc...
Forum posts: 1379
Yes - though in that case you could also just subclass the list box.
didster
Forum posts: 85
You can avoid that by creating the new container first, before destroying the old one.
How about having a top-level container, in which other _sub_ containers are added.. Wouldn't that solve the problem of having no background when swithing the sub-containers?