Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to access variable between NT windows?

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

    How to access variable between NT windows?

    Hi,
    I am creating AddOn using sample provided by NT using Visual Studio and creating dll.
    I have added a checkbox to AddOnFramework new window created through through the sample. After clicking the checkbox, I would like to disable BUY button on Basic Entry window.
    Currently I can disable buy button when window is created but would like to disable it using checkbox which is in a different window.
    Please help.

    #2
    Hi aqilkhan1974, can you give an example script of what you have so far so I can test it on my PC? Please Export what you have so far:


    Comment


      #3
      I would like to enable/disable trading buttons in BasicEntry window from the AddOn Window checkbox click event. See screen shot.
      I can enable/disable while basic entry window is loading inside OnWindowCreated() event.

      I cannot export script the way you requested since I am doing VS development and deploying .dll to NT.

      Comment


        #4
        Hi, thanks for your reply.

        I'm not aware of any supported way of doing this, nor would we recommend disabling any buttons that come with the platform. The subject here is mainly focused in WPF code, so you would need to research how one would do this through WPF programmatically with C#. This is, unfortunately, would be out of the scope of support we can provide. The closest example that I have is an addon that can get all charts an indicators in the workspace. This would be the first step in accessing basic entry windows in the workspace:


        Kind regards,
        -ChrisL

        Comment


          #5
          Thank you Chris for the reply and link to related article. Below code referenced by ChelseaB in the post really helped.

          Code:
          foreach (Window window in Globals.AllWindows) { NTWindow w = (NTWindow)window; window.Dispatcher.BeginInvoke(new Action(() => { if (!w.Caption.Contains("Chart")) return; TabControl tc = w.FindFirst("ChartWindowTabControl") as TabControl; if (tc == null) return; foreach (TabItem ti in tc.Items) { ChartControl tabChartControl = (ti.Content as ChartTab).ChartControl; if (ti.IsSelected) tabChartControl.InvalidateVisual(); } })); }

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          607 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          353 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          560 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          561 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X