Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Missing event in NTTabPage

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Missing event in NTTabPage

    Hi there,
    My add-on uses an AddOnFrameworkWindow with TabControl and multiple NTTabPages.
    I'm missing an event in NTTabPage when MainTabControl's selection has been changed to update global objects like an InstrumentSelector in MainMenu of AddOnFrameworkWindow.

    Unfortunately MainTabControl's event OnItemsChanged() is protected and not accessible.
    Any ideas?

    Many thanks for your help!

    #2
    Hello ruppschtaler, and thank you for your question. According to the publicly available MSDN documentation,

    Originally posted by https://msdn.microsoft.com/en-us/library/system.windows.controls.listview.onitemschanged.as px
    This method is called when there is a change in the items collection of a ListView control.

    While this suggestion is untested, it may be the case that creating your own child class of ListView and adding an instance to replace the main one, and then adding the MainTabControl's children as children of this listview (after saving references to each of the MainTabControl's children and then removing them so that they only ever have one parent), will give you a ListView you can control, with an OnItemsChanged method you can write yourself. You may need to dispatch the reparenting calls to the MainTabControl object.


    Doing the above is an exercise to you, and is outside the scope of the support we typically provide. However we are happy to answer any questions as they come up.
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cre8able, Today, 03:20 PM
    1 response
    9 views
    0 likes
    Last Post cre8able  
    Started by fiddich, Today, 05:25 PM
    0 responses
    3 views
    0 likes
    Last Post fiddich
    by fiddich
     
    Started by gemify, 11-11-2022, 11:52 AM
    6 responses
    804 views
    2 likes
    Last Post ultls
    by ultls
     
    Started by ScottWalsh, Today, 04:52 PM
    0 responses
    4 views
    0 likes
    Last Post ScottWalsh  
    Started by ScottWalsh, Today, 04:29 PM
    0 responses
    9 views
    0 likes
    Last Post ScottWalsh  
    Working...
    X