Event handling for 5.3.3 composite controls
The event handling of a composite control can be divided into three types by implementing functionality:
(1) The internal event handling of the neutron control of the composite control.
(2) contains a processing mechanism-an instance of an event in a child control event that invokes the main control delegate.
(3) Bubble handling mechanism.
The next three sections explain how the three event-handling mechanisms are implemented.
5.3.3.1 the internal event handling of a neutron control for a composite control
This is the easiest way to handle it. Child control events in a composite control are separate, have nothing to do with the main control, and they each perform their own function, and the method is simple, just as you used to use events directly on the page.
This section mainly demonstrates the use of this type of event as an example of a Calculatorcontrol control. First look at the running effect of the control diagram, as shown in Figure 5-4.