Results 1 to 2 of 2

Thread: Slider increment of less than 1

  1. #1

    Default Slider increment of less than 1

    I want to have a slider with a value of 95 to 100 with an increment of .01. I tried with this code, but the increment is 1. Also the field label doesn't show up. Does anyone know how to fix these problems?

    Ext.create('Ext.slider.Single', {
    fieldLabel: 'Similarity Threshold',
    renderTo: Ext.getBody(),
    width: 214,
    minValue: 95,
    hideLabel: true,
    useTips: false,
    maxValue: 100,
    increment: 0.01,
    useTips: true

  2. #2
    Ext JS Premium Member burnnat's Avatar
    Join Date
    Jun 2011


    You have two problems. First, the field label isn't showing up because you have hideLabel set to "true". Second, to round to two decimal places rather than the nearest integer, you need to set decimalPrecision to 2. Here's what it looks like with these things fixed:

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts