INTTabFactory Interface

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Add On >

INTTabFactory Interface

Previous page Return to chapter overview Next page

If you wish to have tab page functionality like adding, removing, moving, duplicating tabs you must create a class which implements the INTTabFactory interface.

 

 

 

This interface contains two methods which must be hidden:

 

NTWindow CreateParentWindow();

NTTabPage CreateTabPage(string typeName, bool isNewWindow = false);

 

Examples

ns


public class MyWindowFactory : INTTabFactory

{

    // INTTabFactory member. Creates the parent window that contains tabs

    public NTWindow CreateParentWindow()

    {

        return new MyWindow();

    }

 

    // INTTabFactory member. Creates new tab pages whenever the user presses the + button

    public NTTabPage CreateTabPage(string typeName)

    {

        return new MyWindowTabPage();

    }

}