if you are using the Push Button widget, you change the text of the button (the label) by modifying its property Label. For example, if you want the text tio toggle each time the user activates the button, implement following code in the slot method connected the Push Button's OnActivate property:
if ( PushButton.Label == "ON" )
PushButton.Label = "OFF";
PushButton.Label = "ON";
If you have created youz own Push Button (e.g. based on the provided templates), you have surely added a Text View to the push button to display the label. You should also add a property (named e.g. Label or Caption) to the Push Button and in the OnSet method of the property implement code to relay the text:
// The value doesn't change - nothing to do.
if ( pure Label == value )
// Remember the property's new value.
pure Label = value;
// Now you can store the text in the text view
Text.String = value;
If both aspects above do not address your application case, please explain it more in detail.