app designer Slider object properties does not contain a 'SliderStep' property
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
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
 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
 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
      
 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 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!




