How do I add User Controls to the tree node in the admin view?
If I’m not mistaken, I believe that the GenerateOverviewUserControl creates an overview page that acts as the tree node, with user controls added as child nodes to this. However, I’m still unsure how to achieve this by adding custom pages to the node.
public override ItemNodeUserControl GenerateOverviewUserControl()
{
return new OverviewPage();
}
I found much to my surprise that a new plugin created with the template does not include this function.
I did a little experiment, created a new plugin “rawTemplate” using the MIPPlugin template. Then in the rawTemplateItemManager I added:
public override ItemNodeUserControl GenerateOverviewUserControl()
{
return
new VideoOS.Platform.UI.HelpUserControl(
rawTemplateDefinition.TreeNodeImage,
"rawTemplate",
"Here you can place help on the top node.");
}
Maybe you could learn from repeating my experiment.
If my answer does not fit, perhaps there is more to your question, then please elaborate. Perhaps include what you have done, what you have observed, and what is missing for the solution you are trying to achieve.
Thank you for the feedback. If I understand correctly, the GenerateOverviewUserControl creates the overview page as the top node, with any created items appearing as child items. Given this, is it possible to create “UserControls” or “Pages” at startup rather than adding items first and then generating the UI for those items?
In the above Image I created two Items by “Righ-click > Add New” but let’s say I don’t want the user to be able to have this functionality but only to see the ones I created.
Example:
OverviewPage
Page1
Page2
I hope this makes more sense to what I’m trying to achieve.
Another question would be how do I disable the “Righ-click > Add New” functionality or remove the “SideBar/SidePanel” and have a default UserControl
**UPDATE**
Within the definition, I noticed that you can modify the following to eliminate the side panel. (I’m not certain if this represents best practice.)
Long story short, the GenerateDetailUserControlList is not called unless I specify ItemsAllowed.Many.
Milestone Development has decided to change this so that a list, DetailedUserControls, can be used together with ItemsAllowed.One in future versions. This will be in MIP SDK 2025R2. It is important to note that it will then require that the Management Client is 2025R2 or newer.
If you want to use this now, and perhaps also have a plugin that is backwards compatible with versions that are a little older, our recommendation is not to use DetailedUserControls but instead develop one user control which has multiple tab using TabControl Class (System.Windows.Forms) or similar.