• 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
    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 barbic, Today, 03:01 AM
              0 responses
              2 views
              0 likes
              Last Post barbic
              by barbic
               
              Started by GARZONJ, Yesterday, 11:22 PM
              0 responses
              3 views
              0 likes
              Last Post GARZONJ
              by GARZONJ
               
              Started by GARZONJ, Yesterday, 09:41 PM
              0 responses
              2 views
              0 likes
              Last Post GARZONJ
              by GARZONJ
               
              Started by mike09, Yesterday, 07:37 PM
              0 responses
              11 views
              0 likes
              Last Post mike09
              by mike09
               
              Started by bebbus, Yesterday, 04:03 PM
              3 responses
              12 views
              0 likes
              Last Post bebbus
              by bebbus
               
              Working...
              X