W
William Ryan
I'm familiar with the label examples and understand them.
Here's what I don't understand though....if I drag a label onto a form and
add this event handler, it's kosher
this.label1.Click += new System.EventHandler(this.label1_Click);
Now, if I add a hanlder for label1_click like so:
private void label1_Click(object sender, System.EventArgs e)
{MessageBox.Show("It Worked");}
And I click on the label, nothing happens. however, the event does show up
in this.label1. and I thought all controls had click as an event.
If I do the EXACT same thign with a PictureBox, it works fine. When I click
on the label nothing, click on the pictureBox works as expected.
I don't need to use a clickable label at the moment, but I'm wondering why
this behavior is what it is?
TIA,
Bill
Here's what I don't understand though....if I drag a label onto a form and
add this event handler, it's kosher
this.label1.Click += new System.EventHandler(this.label1_Click);
Now, if I add a hanlder for label1_click like so:
private void label1_Click(object sender, System.EventArgs e)
{MessageBox.Show("It Worked");}
And I click on the label, nothing happens. however, the event does show up
in this.label1. and I thought all controls had click as an event.
If I do the EXACT same thign with a PictureBox, it works fine. When I click
on the label nothing, click on the pictureBox works as expected.
I don't need to use a clickable label at the moment, but I'm wondering why
this behavior is what it is?
TIA,
Bill