Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Position of value for slider

    The documentation for Slider.showValue says:
    setShowValue

    public void setShowValue(Boolean showValue)

    Indicates whether a label for the value of the slider should be displayed. The default position for this label is to the right of a horizontal slider, or below a vertical slider. Sets the showValue property of the slider

    Parameters:
    showValue - show the slider value?. Default value is true
    See Also:
    setValue(float)

    This is not true either in my code or the showcase. The value is above for horizontal and to the left for vertical. I would really like to show the value to the right of a horizontal slider. Is that possible?

    #2
    Thanks for pointing out the swapped horizontal/vertical wording in the docs, we'll fix that. To show a value label to the right of a horizontal slider, create a separate Label component and use Changed events on the Slider to populate it.

    Comment


      #3
      I want to actually change the value of the label at runtime to be something other than the value of the slider (e.g., map the value to a string and display the string). Is there a way that I can do that? You mentioned that we can create a separate Label and use Changed events on the Slider to populate it. I don't want to create a separate Label. I want to actually change the value that displays above the thumb at runtime. Can this be done, and if so can you provide a code example of how to do this? Thanks.
      Last edited by kbennett; 6 Apr 2012, 11:05.

      Comment


        #4
        Any joy?

        Originally posted by kbennett View Post
        I want to actually change the value of the label at runtime to be something other than the value of the slider (e.g., map the value to a string and display the string). Is there a way that I can do that? You mentioned that we can create a separate Label and use Changed events on the Slider to populate it. I don't want to create a separate Label. I want to actually change the value that displays above the thumb at runtime. Can this be done, and if so can you provide a code example of how to do this? Thanks.
        Hi KBennet,

        I am trying to do exactly this. Did you find a solution?

        James

        Comment

        Working...
        X