How to create hierarchical in plugin?
AnsweredI want to create a hierarchical list like following picture. How to do it?
-
Hi 高偉恆,
Please refer to the document of "settings_model.md" in the metaSDK. (/metasdk/src/nx/sdk/settings_model.md)
You can see the instructions in the file that you can use the "groupbox" with "section" which is a JSON list for the settings model to achieve this goal.
For example :
### Setting Model
{
"type": "Settings",
"items": [
{
"type": "GroupBox",
"caption": "Sample GroupBox",
"items": [
{
"type": "CheckBox",
"name": "checkbox1",
"caption": "Sample CheckBox"
}
]
}
],
"sections": [
{
"type": "Section",
"name": "Sample Section"
}
]
}For the part you marked - I am using the motion detection section as an example. It would be like
{
"type": "Section",
"caption": "Motion Detection",
"sections":
[
{
"type": "Section",
"caption": "Include Areas",
"items":
[ ... ]
},
{
"type": "Section",
"caption": "Exclude Areas",
"items":
[ ... ]
}
]
},
...
...
### Other implementationsHope this helps. Thanks.
Please sign in to leave a comment.
Comments
1 comment