app designer Slider object properties does not contain a 'SliderStep' property

1 回表示 (過去 30 日間)
Andy
Andy 2017 年 11 月 17 日
コメント済み: Chanchal Dass 2021 年 9 月 14 日
Hello Team,
As of 2017b, an app designer slider object has following properties:
Show all properties
BeingDeleted: 'off'
BusyAction: 'queue'
CreateFcn: ''
DeleteFcn: ''
Enable: 'on'
FontAngle: 'normal'
FontColor: [0 0 0]
FontName: 'Helvetica'
FontSize: 12
FontWeight: 'normal'
HandleVisibility: 'on'
InnerPosition: [29 640 207 3]
Interruptible: 'on'
Limits: [1 10]
MajorTickLabels: {'1' '2' '3' '4' '5' '6' '7' '8' '9' '10'}
MajorTickLabelsMode: 'auto'
MajorTicks: [1 2 3 4 5 6 7 8 9 10]
MajorTicksMode: 'manual'
MinorTicks: [1 2 3 4 5 6 7 8 9 10]
MinorTicksMode: 'manual'
Orientation: 'horizontal'
OuterPosition: [23 610 221 39]
Parent: [1×1 Figure]
Position: [29 640 207 3]
Tag: ''
Type: 'uislider'
UserData: []
Value: 3.8261
ValueChangedFcn: [function_handle]
ValueChangingFcn: ''
Visible: 'on'
'SliderStep' is not one of them.
How do you enforce a slider step to be a specific value?
Thanks
  2 件のコメント
Olivier Camus
Olivier Camus 2017 年 12 月 8 日
Personally, I have created a slider to look at different images in a multipage image file. To make sure the slider increments only on integer values I have in my callback function: newValue = round(slider.Value) %variable slider.Value = newValue The second line allows for the slider to update to this rounded value. Hope this helps.
Pranaya Kansakar
Pranaya Kansakar 2020 年 4 月 28 日
Hi Oliver
Would you mind sharing the code for your slider? I'm trying to do something similar but am having difficulty doing so.
Thanks!

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

採用された回答

Greg
Greg 2017 年 12 月 2 日
There is no need for a SliderStep property anymore. The old slider had arrows for "small step" and click inside but not on the "thumb" for "large step." The new slider automatically jumps to the clicked location, or can be click-and-dragged.
If you are trying to make it a discrete slider, use the ValueChangedFcn or ValueChangingFcn to validate the slider's value. Or use a discrete knob.

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by