instead of multiple views can we have multiple containers ?

Login to reply to this topic.
Tue, 2005-02-01 15:29
Joined: 2005-01-28
Forum posts: 27
can I implement the multiple view concept using multiple containers ?

Anirban


Tue, 2005-02-01 15:36
Joined: 2004-07-28
Forum posts: 1379
instead of multiple views can we have multiple containers ?
If you like.

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

Wed, 2005-02-02 08:26
Joined: 2005-02-01
Forum posts: 36
instead of multiple views can we have multiple containers ?
> you have one control which fills the entire view (say a list box) you >DONT need a container.

Unless you want to override some keys etc...
Wed, 2005-02-02 08:54
Joined: 2004-07-28
Forum posts: 1379
instead of multiple views can we have multiple containers ?
>Unless you want to override some keys etc...

Yes - though in that case you could also just subclass the list box.

didster

Mon, 2005-02-14 15:17
Joined: 2004-10-17
Forum posts: 85
instead of multiple views can we have multiple containers ?
Quote from: didster
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.

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?
  • Login to reply to this topic.