Topic: Accessing All Controls
Example-1:
Suppose we have several different buttons as shown in the picture below:
Let double click on the “ClickMe” button, and you will get the following method:
Let’s type there the following codes:
This means when you execute this program and after click the ClickMe button then text on every button will become as “Hello” text.
You can see only button4 text has not been changed. That is because it lies inside the groupbox.
Example-2:
Result: Now in time after clicking the ClickMe button then text on every button will become “Hello” text.
Переглядів: 152 |