SetValue() doesn't update the GUI.
Posted: Sun Jan 22, 2023 5:39 am
Calling SetValue on a knob in the Notify method does not appear to update the GUI for the knob.
As a simple example I have a single knob (knob1) and in the Notify method the following code:
As expected, if the knob is dragged by mouse the code never lets the knobs value get above 0.5 but the knob graphic can rotate beyond the 0.5 position.
Is this just a limitation of the API or an I doing this wrong?
Basically, I need to restrict a knobs value to below some threshold but that threshold value changes while the code is running.
Should I be trying to change the Max and Min values on the fly?
Cheers,
Peter
As a simple example I have a single knob (knob1) and in the Notify method the following code:
Code: Select all
case Knob_Changed: // doubleValue is the new VoltageKnob value
{
if(component == knob1)
{
if (doubleValue > 0.5)
{
knob1.SetValue(0.5, true);
}
}
}
break;
Is this just a limitation of the API or an I doing this wrong?
Basically, I need to restrict a knobs value to below some threshold but that threshold value changes while the code is running.
Should I be trying to change the Max and Min values on the fly?
Cheers,
Peter