• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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

    #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.

      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!

          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.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Dan_D_Trader, Today, 03:49 PM
              0 responses
              4 views
              0 likes
              Last Post Dan_D_Trader  
              Started by JohnAymin, Today, 02:38 PM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_Tyler  
              Started by Rmos22, Today, 02:20 PM
              2 responses
              22 views
              0 likes
              Last Post Rmos22
              by Rmos22
               
              Started by sawtooth500, Today, 12:59 PM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_Spencer  
              Started by Steve L, Yesterday, 09:36 PM
              1 response
              22 views
              0 likes
              Last Post NinjaTrader_Kate  
              Working...
              X