フィルターのクリア

how can I make a GUI control (e.g. slider) respond to a change in the workspace variable?

2 ビュー (過去 30 日間)
Michael
Michael 2017 年 11 月 3 日
編集済み: Michael 2017 年 11 月 12 日
Is there a way to make a GUI control, e.g. slider, or a label, or text box to respond to a change of the workspace variable without explicitly setting it properties every other place in the application that changes that variable?
I am constrained to do it in R2011, so the newer version's class event/listener feature is not available.
  2 件のコメント
Stephen23
Stephen23 2017 年 11 月 3 日
編集済み: Stephen23 2017 年 11 月 3 日
Short answer: no.
Long answer: write a class for that variable, and set a listener.
Trivial answer: write a little function that sets the slider. Call it everywhere where the variable is changed.
Alternative answer: write object oriented code, and have one method that sets the value and changes the slider.
Michael
Michael 2017 年 11 月 3 日
Can you elaborate on the "Long answer"? a codelet would be helpful, or a pointer to the Reference. Thanks...

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by