Slider text box without slider


#1

Hello,
probably I need something much simpler than Slider. I want text box with the same functionality as Slider text box in mode isReadOnly=false; But I don’t want slider.
Yes I need just simple text box by which I can send the integer or double value to another functions. What is the easiest way to do that in Juce?
Great thanks in advance for any help in such stupid question.


#2

You are looking for the Label class which may be used both to just display strings you feed into it or to optionally become editable when clicked. You can set a Listener that will be called when the label content was modified by the user.


#3

Maybe you can set the Slider’s style to IncDecButtons?
This way you don’t have Sider but a Text box with two ± buttons next to it.


#4

Hello,
yes, label is perfect, thanks. Only one question, edition of label is by one click of mouse. Can’t I set it to double click?


#5

Label:: setEditable()

https://docs.juce.com/master/classLabel.html#a9342a397932d82bb1d196ebf9a8969d8

Rail