How can I change the lamp color while the application is running?
22 ビュー (過去 30 日間)
古いコメントを表示
Esteban Zubiria
2019 年 11 月 19 日
回答済み: Walter Roberson
2019 年 11 月 19 日
Hi everybody!
I want to inroduce a lamp in my applycation, that shows the status of the application.
-Grey: introducing data.
-Red: calculating.
-Green finished.
The PROBLEM is that while the aplication is running the lamp color doesn´t change. When introducing the data it is grey, as it is set, but when I press the calculation button, it doesn`t change color to red, even if it is the first comand in the code. It seems like the application cannot send the order in real time.
I tried the following and no one worked:
- Switch command.
- Lamps states.
- Internal function.
Any suggestion to get the lamp red while runnig and green when finished?
Thanks!
4 件のコメント
Walter Roberson
2019 年 11 月 19 日
Are you talking about a uilamp component? https://www.mathworks.com/help/matlab/ref/matlab.ui.control.lamp-properties.html ? If so then are you using drawnow() after you set the lamp state so that MATLAB has a chance to update the screen?
採用された回答
Walter Roberson
2019 年 11 月 19 日
Use drawnow() to give MATLAB a chance to update the screen.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!