[Max5] Number box question


Has anyone an idea about how making number boxes as ones stand in Max 5?

Thank you.


screen capture?


Are you talking the plain box with the invisible slider that changes the number in the box on the mouse down?

If I were starting that, I’d use a normal text box, and then steal the mouseDrag code from the vertical slider to handle adjusting the value on a drag.


That’s what people usually call a spinner label.

You just need to inherit juce::Slider with style RotaryVerticalDrag and add a juce::Label as its child using its full rect as bounds, override paint and draw nothing and override valueChanged and set the label value according to the slider


There are subtle issues with MaxMSP numboxes though (at least in Max4) because the drag resolution changes according to the decimal position which makes it very convenient.

I’m wondering about what would be the best way to implement that in juce?
GlyphArrangement and PositionnedGlyph looks like good starting points


Thanks for those answers.

what is a glyph ? Any pic ?

The number box is something people in MaxMSP like. We make something like that with Juce too. I think a vertical slider seems to be a good way.


have a look here:


screen capture: look at the 127 box :

This is made with Juce.


But Cycling’74 use another drawing library on top of Juce, yes?