W
Water Cooler v2
Besides querying the Text property, how do you find out which button on
the toolbar has been clicked? The Name property doesn't appear in the
code window, but only appears in the design mode.
The problem is that I have added a lot of spaces to the left of the
label of one of my buttons. The actual label text I have entered in the
design mode is " Exit Map".
When I query this:
else if (e.Button.Text.Trim() == "Exit Map")
{
this.Dispose();
this.Close();
}
The code skips this condition altogether. For the other labels, it
enters the construct as it should. I am a bit confused.
the toolbar has been clicked? The Name property doesn't appear in the
code window, but only appears in the design mode.
The problem is that I have added a lot of spaces to the left of the
label of one of my buttons. The actual label text I have entered in the
design mode is " Exit Map".
When I query this:
else if (e.Button.Text.Trim() == "Exit Map")
{
this.Dispose();
this.Close();
}
The code skips this condition altogether. For the other labels, it
enters the construct as it should. I am a bit confused.

