Through NinjaScript code, I have developed an AddOn which successfully adds a button to all NT8 charts main menu on the top. I’m able to achieve that, on any open chart, when this button is clicked by user, a new window (AddOnFrameworkWindow) opens up. It opens as a separate new window.
Instead of a new window, I need this window to appear as part/subwindow of the chart. In other words, I need this new window to appear inside the chart window/container. Like the chart Trader appears as part of the chart and not as a new window when we press chart Trader On button in NT8 charts main menu. Please guide me how can I do this in my NinjaScript code.
Below is the code I used in this regard:
public AddOnFrameworkWindow()
{
Caption = "My AddOn";
Width = 400;
Height = 400;
TabControl tc = new TabControl();
TabControlManager.SetIsMovable(tc, true);
TabControlManager.SetCanAddTabs(tc, true);
TabControlManager.SetCanRemoveTabs(tc, true);
TabControlManager.SetFactory(tc, new AddOnFrameworkWindowFactory());
Content = tc;
tc.AddNTTabPage(new NinjaTraderAddOnProject.AddOnPage());
Loaded += (o, e) =>
{
if (WorkspaceOptions == null)
WorkspaceOptions = new WorkspaceOptions("AddOnFramework-" + Guid.NewGuid().ToString("N"), this);
};
}
Comment