How to change the color of a lamp component when a button is pressed in AppDesigner ?

조회 수: 57 (최근 30일)
Joseph
Joseph 2019년 7월 4일
댓글: Pawel 2020년 10월 22일
I have tried using the following command but it did not work:
app.mylamp.Color = [0.3010 0.7450 0.9330]
Thanks

답변 (1개)

Kevin Chng
Kevin Chng 2019년 7월 4일
It should be working. I guess you miss out something, i try to do the full workflow here : I hope it helps you
1) Create button and lamp
1.png
2) Create callback function for button
1.png
3) Inside the callback function type
1.png
4) Ensure app.Lamp is the component's name
1.png
Let me know if you still cant do it.
  댓글 수: 4

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by