App Designer initial value for UserData for Slider
10 ビュー (過去 30 日間)
古いコメントを表示
I want to return from a slider a different value than its Value property (that is, a value computed based on its Value).
In GUIDE, I would do this using the UserData propery, however, the App Designer GUI provides only the "Tag" property from the Identifiers section.
If I inspect the object in code I can see that there is a UserDate property available for the slider:
Position: [50 522 693 3]
Tag: ''
Tooltip: '30.5px'
Type: 'uislider'
UserData: []
Value: 0.3000
ValueChangedFcn: ''
ValueChangingFcn: @(source,event)executeCallback(ams,app,callback,requiresEventData,event)
Visible: on
I was thinking that I can initialize the UserData in the CreateFcn of the slider - but the slider comes only with ValueChangedFcn and ValueChangingFcn.
So how can I set an initial value to the UserData?
I'm using Matlab R2023a.
3 件のコメント
採用された回答
Voss
2025 年 2 月 24 日
You can initialize the slider's UserData in the app's StartupFcn.
4 件のコメント
Voss
2025 年 2 月 24 日
You're welcome!
You can make an enhancement request as follows: https://www.mathworks.com/matlabcentral/answers/460998-how-can-i-make-a-features-request#answer_374172
その他の回答 (0 件)
参考
カテゴリ
Help Center および File 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!
