I've got many trouble during development of my new module.
There are VoltageLabels, that can be edited by user. Any change provides a message in Notify()-Label_Changed. So input data can be processed.
These labels are modified by the code too. And everytime this results in an unwanted notification event.
So I suppose to add the method SetTextNoNotification() to VoltageLabel as it is available in similar manner for VoltageKnob.SetValue().
Feature request for VoltageLabel()
-
- Posts: 625
- Joined: Mon Nov 15, 2021 9:23 pm
- honki-bobo
- Posts: 310
- Joined: Sat Nov 09, 2019 1:18 pm
Re: Feature request for VoltageLabel()
+1, though you can easily workaround this by introducing a boolean to indicate if a notification should be executed or not.
In the variables section, you'd declare
Then, in Notify() you'd write something like
And finally, where you change the label text in the code:
In the variables section, you'd declare
Code: Select all
private boolean notify = true;
Code: Select all
case Label_Changed:
{
if (component == textLabel1) {
if (notify) {
// handle change by user
} else {
// handle change by code
notify = true;
}
}
}
break;
Code: Select all
notify = false;
textLabel1.SetText("It wasn't me... the code did this.");