Show value on knob, but not editable
-
Hello. I wanna make a value to display normally on a knob (in the middle), but I don't want the value to be editable. I can't find any function there to do this.
This causes the knob only working outside the edit value, which is frustrating.
Thanks!
-
@svkpowa Do you mean like this?

-
@David-Healey Yes, but there shows the edit range

and the knob works only on a tiny piece on the top. Why? It looks normal when not being edited.

-
@svkpowa Disable the showTextBox option in the property editor.
-
@David-Healey Fine, but the value disappears. I want it to be there, but disable the edit option.
-
@svkpowa For that I think you'll need to use custom look and feel which is what I used to create the knob I showed.
-
@David-Healey so there is no way to scale the edit box to be only in the middle, for example?
-
@svkpowa As far as I know we have no control over it
-
@David-Healey what about the custom textbox, like for example in the corner? I mean, when I change the volume, it shows: "Volume: 70%", when I'm changing the reverb, it says "ReverbMix: 30%" etc etc. Is it possible?
-
@svkpowa It just shows the value I think.
-
@David-Healey Displaying just the value is fine compromise, is there a script for floating tile to do this?
-
@svkpowa said in Show value on knob, but not editable:
Displaying just the value is fine compromise, is there a script for floating tile to do this?
I thought it's already displaying the value, isn't that what you showed in your image? There is no control over the text box through scripting. If you can't achieve what you need with the property editor then you need to use custom look and feel.
-
You misunderstood me. I meant something like this, for example in Spire:

-
@svkpowa For that you'd need to draw the value in a panel using a paint routine. For multiple knobs a broadcaster would be the best method for updating the panel - but it's not the easiest for beginners.
-
@svkpowa You could use a label control then set the text value of the label with the value of the knob in the knob's callback. Then you can place the label where you want in the UI.
Something like this...
Label1.set("text", knob1.getValue());
This code would be in the knob1 callback. -
Okay, Gemini helped me, but it can't solve a problem. Only components named Volume and Balance are giving the text, the rest is not reacing:
// 1. Pobieramy okienko wyświetlacza const var Label1 = Content.getComponent("Label1"); // 2. Definiujemy jedną, wspólną funkcję dla wszystkich knobów inline function onKnobUpdate(component, value) { // Pobieramy nazwę z pola "text" komponentu i wartość z 1 miejscem po przecinku local name = component.get("text"); local val = Engine.doubleToString(value, 1); Label1.set("text", name + ": " + val); } // 3. Ręczna lista Twoich knobów (wpisz tutaj ich ID) // To jest najpewniejsza metoda w HISE const var knobList = [ Content.getComponent("Volume"), Content.getComponent("Gain"), Content.getComponent("Balance"), Content.getComponent("ReverbMix1") ]; // 4. Przypisujemy funkcję do każdego knoba z listy powyżej for(k in knobList) { if(k) // Sprawdzamy czy knob w ogóle istnieje { k.setControlCallback(onKnobUpdate); } } -
@svkpowa said in Show value on knob, but not editable:
if(k)
This is not needed.
@svkpowa said in Show value on knob, but not editable:
Only components named Volume and Balance are giving the text, the rest is not reacing:
Components can either use a control callback or they can be connected by processor/parameter ID - the knobs that aren't responding are connected via the latter so the callback will never trigger.
Either you need to do it all through the callback or use broadcasters.
-
@David-Healey needed some time to figure it out

-
@svkpowa Noice, what was the secret?
-
@David-Healey i created a second "knob" with the scale of 0.001 to make it invisible and scaled the tile to fit into the real knob, then - linked to it. one knob makes as a controller, the second one as display. had to make it with every knob, but hey - it's just 10 minutes