Form, ContainerControl and IContainer

  • Thread starter Thread starter Francois Vanderseypen
  • Start date Start date
F

Francois Vanderseypen

Why is it that the Form class does not implement the IContainer
interface? It inherits from ContainerControl but components are
attached to the 'components' field via the generated

private System.ComponentModel.Container components = null;

statement. Said differently, when should I implement the IContainer
interface?

Thanks a lot!

Swa.

http://netron.sf.net/
 
Francois,

IContainer does the following things

a) Encapsulate and track zero or more components
b) Components can be visual or non-visual

ContainerControl does the following things

a) represents a control that can function as a container for other controls
b) provide a logical boundary for contained controls.
c) provides focus management. tracks active controls
d)captures TAB key to move to next control
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top