Regarding the GUI update to change the slider values.

조회 수: 3 (최근 30일)
Paramjit Yadav
Paramjit Yadav 2024년 7월 24일
댓글: Voss 2024년 7월 26일
Dear Friends Hello,
I have a querry I request to please help.
I have created a GUI where the values is gratting is selected from the 'select_gratting' as shownin attached figure. I want to change the slider limits based on gratting selected. For example currently it shows - 30 to 550 for 1200 gratting values, but when 2400 gratting selected I want slider limit to change and show 30 to 250 without closing the GUI.
I request to please help, how can I do this.
Thanking you,
Kind regards

채택된 답변

Voss
Voss 2024년 7월 24일
Assuming app.dropdown is your dropdown component and app.slider is your slider component:
if app.dropdown.ValueIndex == 1
app.slider.Limits = [30 550];
else
app.slider.Limits = [30 250];
end
  댓글 수: 6
Paramjit Yadav
Paramjit Yadav 2024년 7월 26일
Dear @Voss
Thank you so much for help. It worked. Cheers.
Kind regards
Voss
Voss 2024년 7월 26일
You're welcome!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by