show value button



  • Hello, I am looking for a way to create a small screen on my vst in order to display the value of the selected buttons.
    if I assign my buttons directly from the code I can use this formula, Label1.set ("text", value); and they work.
    but, I used the button assignment from, the property editor window. so even if I put>
    inline function onKnob1Control (component, value)
    {
    Label1.set ("text", value);

    };

    Content.getComponent ("Knob1"). SetControlCallback (onKnob1Control);

    it won't work because my button is assigned from the property editor.

    So is there an easy way to create a label that displays the value of all the selected buttons?
    a bit like the showValuepopUp but in a single label and especially without redoing all the button assignment with the code ... thank you;)



  • @yall You cannot use both the property editor and the callback at the same time. The property editor is good only and only if you know the component has one job to do.
    So for your needs you have to do everything in your button(s) callback (so your code above is good)
    Now, do you want one label per button or one for all buttons (so it displays only the last one) ?
    Also, are your button in a radioGroup or independent ?



  • @ustk in fact I can do it perfectly from the code but as I assigned about thirty buttons from the property interface, I didn't want to redo everything. I would have thought there would be a solution.
    I just thought, what if I want to retrieve the value of the button but from the effect and not from the button c is possible?

    yes I only want a single label, indeed it will display the last selected button but that does not pose a problem for me.
    the solution to recover the value from the effect can be done


Log in to reply
 

15
Online

1.1k
Users

3.8k
Topics

33.4k
Posts