I've got the situation, where I want to get a widgets selection, depending on the state of another widget.
Example:
Settings:
...
settings = { # inside the class, as self.settings
"a": [1, 2, 3,],
"b": [False, True,],
"c": ["X", "Y", "Z",],
}
...
Widgets:
...
"selection": (s.settings[choice], {}), # in INPUT_TYPES definition
"choice": (["a", "b", "c", ], {"default": "a",}),
...
Dependig on "choice" the "selection" widget should allow to select between
- 1, 2, 3
- False, True
- X, Y, Z
This definition doesn't work, because the choice key for the selection can't be defined that way. However, I don't know any other way, to do that.
How can this be solved, in a short, efficient way?
I've got the situation, where I want to get a widgets selection, depending on the state of another widget.
Example:
Settings:
Widgets:
Dependig on "choice" the "selection" widget should allow to select between
This definition doesn't work, because the choice key for the selection can't be defined that way. However, I don't know any other way, to do that.
How can this be solved, in a short, efficient way?