App Designer initial value for UserData for Slider
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Voss
el 24 de Feb. de 2025
You can initialize the slider's UserData in the app's StartupFcn.
4 comentarios
Voss
el 24 de Feb. de 2025
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
Más respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
