General information
Category:
Object Oriented Programming
Because you are dealing with multiple controls, the most important feature is encapsulation. You will either want to use a container class or a control class. The primary difference is that with a container, you can still access the contained controls. With a control class, all of the controls at run time become on homogenoeous unit. If you are familar with the VB usercontrol, it is the same thing.
Whether you use a container or a control, the following applies. Have common methods at the container level that are responsible for updating and refreshing controls. Essentially, you are delegating the responsibility to the container to make sure all of the controls get updated and refreshed. This gets you out of a lot of inter-control communication. You also get out of the need for a lot of extra custom properties.
The nice thing is that whether you are changing the value externally or in the Valid of a contained control, the same code will work.
Finally, by using a container and not a form, you then have the flexibility of placing the class on a pageframe or on a different type of form. IMO, forms as the container for these type of forms are too implementation specific
Whether this is the best way or not, I don't know. It has worked for me and from design standpoing, I think it is pretty solid.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only