What is the difference between valuechangedfcn and valuechangingfcn?

11 ビュー (過去 30 日間)
Some data entry window functions have the option to select a callback with options "valuechangedfcn" and "valuechangingfcn". I have used the valuechangedfcn callback to do something after the GUI user changes the value in that field. But, I don't know what valuechangingfcn is used for. Is that for doing something when a user clicks within the field and has not yet finished entering the new value, and the GUI would do something during that time? What would be an example?... Maybe pause an execution that is underway?

採用された回答

Kevin Holly
Kevin Holly 2022 年 6 月 7 日
Let's say it is a slider. "valuechangedfcn" would occur after you finished dragging the slider and let go on a new value. "valuechangingfcn" would occur while you are dragging the slider.
  3 件のコメント
Ranjan Sonalkar
Ranjan Sonalkar 2022 年 6 月 7 日
Makes sense. Thanks

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

その他の回答 (1 件)

Matt J
Matt J 2022 年 6 月 7 日
編集済み: Matt J 2022 年 6 月 7 日
Is that for doing something when a user clicks within the field and has not yet finished entering the new value, and the GUI would do something during that time? What would be an example?
Suppose you wanted to implement some sort of autocomplete feature. As the user types characters into an edit-text field, its valuechangingfcn can have a different edit box display suggested completions.
  2 件のコメント
Lwando Mlindini
Lwando Mlindini 2022 年 8 月 1 日
Thanks a lot tha was helpfull@Matt J

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

カテゴリ

Find more on Interactive Control and Callbacks in Help Center and File Exchange

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by