Changing a Text Object's Caption

The following example changes the caption of text you have entered when you click on the text at run-time.

To change a text object's caption:

  1. Create a Text object and enter "Hello".
  2. Edit the Text object's Click event.
  3. Enter the following code:

Text1.Caption = "New Caption"

  1. Switch to Run and click on the Text object.

    The caption of the Text object will change from Hello to New Caption.

See Also

How Do I...