# Display knob on Dashboard for variable of int type?

**URL:** <https://forum.juce.com/t/display-knob-on-dashboard-for-variable-of-int-type/30773>\
**Category:** General JUCE discussion\
**Created:** [December 7, 2018, 11:19pm UTC](https://forum.juce.com/t/display-knob-on-dashboard-for-variable-of-int-type/30773 "2018-12-07T23:19:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xabe](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/xabe/32/5423_2.png) [@xabe](https://forum.juce.com/u/xabe)\
**Post date:** [December 7, 2018, 11:19pm UTC](https://forum.juce.com/t/display-knob-on-dashboard-for-variable-of-int-type/30773/1 "2018-12-07T23:19:01Z")

</div>

Hi there,

I’m very new to this and I’ve been trying to customise an app to build the exact controller I want.

It seems that the only way I’ve found to display a knob on the ROLI Dashboard is using a `displayMode="bipolar"` variable whose type is **float** :

![2](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/c/c5379a9dc6aec5fa2cd1138840e7d9af3d1d7edf.png)

Is there a way to display a knob with **int** values?

I can do with a float value, not a big issue and I was just curious 🙂

Cheers!

---

<div class="post-metadata">

**Author:** ![nseaprotector](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nseaprotector/32/5204_2.png) [@nseaprotector](https://forum.juce.com/u/nseaprotector)\
**Post date:** [December 8, 2018, 10:12pm UTC](https://forum.juce.com/t/display-knob-on-dashboard-for-variable-of-int-type/30773/2 "2018-12-08T22:12:59Z")

</div>

Hi, not sure about what you mean.  
but if you don’t wanna see the decimal on the screen you can round by the use of  
`setNumDecimalPlacesToDisplay(0);`  
call it after the setRange fonction  
if you wanna have the int value in the code  
`int value = Slider.getValue();`  
if it’s a pointer  
`int value = Slider->getValue();`

---

<div class="post-metadata">

**Author:** ![xabe](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/xabe/32/5423_2.png) [@xabe](https://forum.juce.com/u/xabe)\
**Post date:** [December 9, 2018, 11:34pm UTC](https://forum.juce.com/t/display-knob-on-dashboard-for-variable-of-int-type/30773/3 "2018-12-09T23:34:42Z")

</div>

Hi @nseaprotector and thanks!

Sorry if my message wasn’t clear. You understood correctly and I’d like to hide the decimal for the sliders on the screen shot I posted. I’d like to show “127” and “115”, instead of “127.0” and “115.22”. They’re MIDI values so the decimal is irrelevant here. I convert this value to an `int` later to use it as a fixed/min/max velocity, so the decimal is just a cosmetic issue in the interface.

I’ll try to make it work with what you replied. I’m actually using the BLOCKS Code editor, so I’m not sure I can customise the Slider function. As I said, I’ve very new to this and I have a poor knowledge of C++ unfortunately. I’ll look into this next week! Thanks again.
