Overriding the UserControl's Methods

Use Class Outline to easily override methods in your control's inherited classes. The overridden method code that is created by Class Outline provides a head start in implementing the method in your control's class. You can use the comments provided by Class Outline in your overridden method code to quickly determine where to add your own code.

To override a method using Class Outline

  1. In Class Outline, expand the class node.

  2. Expand the Inherited members node, and right-click the method name that you want to override.

    If the method can be overridden, the shortcut menu displays Override Method.

  3. Click Override Method.

    Class Outline adds a method definition for the specified method to your source code.

  4. For the GroupCheck control, create overridden methods for the add, getControl, getControlCount, getControls, remove, and setText methods.

The next step is to add code to the overridden methods.