Change Button text when pressed in app designer

86 ビュー (過去 30 日間)
Dhananjay Singh
Dhananjay Singh 2021 年 10 月 11 日
コメント済み: Dhananjay Singh 2021 年 10 月 11 日
How to change text for a button when pressed. I have a Calculate button which performs some calculations, I want it to change to "Calculating" and after process is over revert back to orignal.

採用された回答

Thomas Fournier
Thomas Fournier 2021 年 10 月 11 日
You can change the text displayed on your button through the command:
app."name of your button".Text="newName"
  1 件のコメント
Dhananjay Singh
Dhananjay Singh 2021 年 10 月 11 日
If I put this command at the starting of code it changes(app.CalculateButton.Text = "Calculating.." ); but when I put (app.CalculateButton.Text = "Calculate") at the end to revert it back to orignal it doesnt change to "Calculating..."

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by