1
The click event is not triggered when you click on the child elements. The UserControl.Click
is triggered only by clicking on UserControl
and not in the Label
that counters it.
In his UserControl
treat the clicks of the child elements so that the UserControl.Click
be fired.
componente1.Click += new EventHandler(filho_Click);
componente2.Click += new EventHandler(filho_Click);
componente3.Click += new EventHandler(filho_Click);
and the event Handler:
private void filho_Click(object sender, System.EventArgs e) {
this.OnClick(e);
}
@vnbrs That would be Handler?
– isaque
@vnbrs No... I thought just adding the event in control would already work
– isaque
@vnbrs I did not treat the event later...
– isaque