How to update ComboBox range
AnsweredIn Meta SDK, is there a way to update the range value for a ComboBox?
So instead of assigning a constant range in the manifest like this:
{
"type": "ComboBox",
"name": ")json" + kSerialPort + R"json(",
"caption": "COM Port: ",
"defaultValue": "COM4",
"range": ["COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8"]
}
Can you set a dynamic value in the manifest like this?
{
"type": "ComboBox",
"name": ")json" + kSerialPort + R"json(",
"caption": "COM Port: ",
"defaultValue": "",
"range": ")json" + testSerialRange + R"json("
} // Where testSerialRange = ["COM_N" ...]
Or can you set a new range similar to setting a new value?
const auto response = new SettingsResponse();
response->setValue("pluginSideTestSpinBox", "100");
-
Mike, you should be able to return a dynamic manifest and the changes would apply.
But it is important, that your plugin can operate in a multi-server system, so every plugin should return consistent manifest, otherwise, user will see unpredictable results.
Please, let us know if you see any issues while trying dynamic manifest.
1
Please sign in to leave a comment.
Comments
1 comment