21.4 Adding a Tab to the Main UI (User Interface)
Sep/26/2008
One of the
most common functions added with a 3rd party plug-in is the ability to add a tab
to the main UI of the interface. This allows you to place your own tab beside
the Home, Tools, and Personal tabs and provide additional functionality similar
to the way the Home tab works when that tab is selected.
The
ITabProvider interface is responsible for allowing you to add your tab to the
UI. The following methods are available.
ITabProvider
Tabs: The tab method also passes a form
to your implementation. It is important that you cache this form, as it is a
reference to the main window in Tradepoint. This can be used to ensure that any
forms that you wish to create as a result of buttons being clicked etc. will be
completely integrated into the Tradepoint software using the form.MDIParent
property. You should return an
array of Dotnetbar RibbonTabItems from this function, or an empty array if you
do not plan on adding any tabs.
Tip: To create a
ribbontabitem the easiest way is to create a form in
your plug-in, and add a Dotnetbar Ribbon to that form and create a tab on the
ribbon with your graphical elements and buttons available. You can then pass that item back within
your interface.
SetSecurity: This method allows you to
override the default security for your new tab. To get at the current security
settings of the logged in user, please use Tradepoint.API.CurrentUser for
details.