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

NTWindow: is right part of caption accessible?

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

    NTWindow: is right part of caption accessible?

    Hello.

    Please, look in screen-shot attached.
    Caption property set text on red background of NTWindow header.
    Is there a way to add text on right part NTWindow header?

    Thank You.
    Attached Files
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    The right side of an NT window would contain its Menu to place buttons or other toolbar type items. You could likely place text inside of the menu as well. Are you creating your own NTWindow or are you asking about the output window specifically?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I am creating my own NTWindow, of course.
      Thank You for Your answer.
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment


        #4
        Hello fx.practic,

        In that case it should be very simple, you just need to append your item into the MainMenu:

        Code:
        MainMenu.Add(new System.Windows.Controls.Label(){Content = "TEST", Foreground = Brushes.White});
        The Menu takes most standard WPF controls, you may need to experiment to find what you like as the NT8 styles take over the default WPF styles.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Wow, it's so simple!
          I tried - It worked ))
          And no need to add MainMenu!

          Jim, is there any way to paint labels and other controls according to current skin (font, background, borders, etc.) ?

          Thank You!

          fx.practic
          NinjaTrader Ecosystem Vendor - fx.practic

          Comment


            #6
            Hello fx.practic,

            The controls you use should mostly all already inherit the NT skins but it may depend on what you are trying to do. The Label example in the Menu would be an odd use case so that likely would need to be custom styled. If you instead use the standard items for the menu such as buttons, those would look like the existing buttons in the menu with the same styles. You noted that you wanted text which a Label would generally be used for but a button could also do that and just not do anything when clicked.

            I would suggest instead looking at the following example of creating a toolbar button to inherit styles: https://ninjatrader.com/support/foru...bs?postcount=2



            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Thank You once more.
              fx.practic
              NinjaTrader Ecosystem Vendor - fx.practic

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Pattontje, Yesterday, 02:10 PM
              2 responses
              15 views
              0 likes
              Last Post Pattontje  
              Started by flybuzz, 04-21-2024, 04:07 PM
              17 responses
              229 views
              0 likes
              Last Post TradingLoss  
              Started by agclub, 04-21-2024, 08:57 PM
              3 responses
              17 views
              0 likes
              Last Post TradingLoss  
              Started by TradingLoss, 04-21-2024, 04:32 PM
              4 responses
              45 views
              2 likes
              Last Post TradingLoss  
              Started by cre8able, 04-17-2024, 04:16 PM
              6 responses
              57 views
              0 likes
              Last Post cre8able  
              Working...
              X