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

NinjaTrader 8 Icon Dictionary

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

    NinjaTrader 8 Icon Dictionary

    Dear Support,

    Looking for a reference that provides a list or a dictionary of NT8 Icon definitions similar to the following:

    "AndrewsPitchfork", NinjaTrader.Gui.Tools.Icons.DrawAndrewsPitchfork ,etc.

    A few of specific definitions for Icons of interest are:

    Delete All Drawing Objects,
    Snap Mode
    Stay in Draw Mode

    Thank you.

    #2
    Hello aligator,

    Thank you for the post.

    I am unsure of a specific resource we offer that lists all of these resource keys, I will need to further research this to see what I can locate.

    For the time being, you may look into using an approach similar to the following forum item. The poster used images that are included in the download, this is not necessarily optimal but could get you results for the time being. http://ninjatrader.com/support/forum...d=9&linkid=781

    Once I have further information on this I will reply back here.

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

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello aligator,

      Thank you for the post.

      I am unsure of a specific resource we offer that lists all of these resource keys, I will need to further research this to see what I can locate.

      For the time being, you may look into using an approach similar to the following forum item. The poster used images that are included in the download, this is not necessarily optimal but could get you results for the time being. http://ninjatrader.com/support/forum...d=9&linkid=781

      Once I have further information on this I will reply back here.

      I look forward to being of further assistance.
      Thank you Jesse,

      The link helps, but it introduces Bitmap and .jpg buttons that will takes things a little beyond the scope of what I am coding.

      I assume that Ninja has definitions for all Icons as part of the main toolbar and its sub-menus. I was able to find definitions for all drawing tools such as:

      Code:
      btnRay = new System.Windows.Controls.Button { Content = NinjaTrader.Gui.Tools.Icons.DrawRay, };
      for DrawRay.

      So, I am trying to find a similar content definition for other items in the drop down menu under the Drawing Tools, i.e. DeleteAllDrawingObjecs or SnapMode icons.

      Many thanks.

      Comment


        #4
        Hello
        .
        I just wanted to reply back on this item.

        Yes internally there is a set of icons used, it appears these are Font Icons in a custom font and not resources. This means that most items internally seem to use a specific font and then a specific code for the image. At this time I have been unable to retrieve a list or any other information regarding how to access these icons from NinjaScript. I have put in a feature request to gather further information on this subject. For the time being including your own resources or images would likely be the only way to accomplish this.

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

        Comment


          #5
          Hi there,

          I'm wondering if you can provide some information how to access these custom font icons (NInjaTrader.Gui.Tools.Icons) in an Add-On by now?

          Thank you!

          Comment


            #6
            Hello,

            Thank you for the post.

            The answer to this question was provided in a previous post:

            Code:
            btnRay = new System.Windows.Controls.Button { [B]Content = NinjaTrader.Gui.Tools.Icons.DrawRay[/B], };
            The Content of the control in question would be set to the string for the icon you want like shown in this example.

            Are you unable to use the icon as a content for a specific control in an addon?

            The control being used needs to allow for Fonts to be used and have the custom font as its selected font, please see this post for an example of the syntax: https://ninjatrader.com/support/foru...10&postcount=4

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

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello,

              Thank you for the post.

              The answer to this question was provided in a previous post:

              Code:
              btnRay = new System.Windows.Controls.Button { [B]Content = NinjaTrader.Gui.Tools.Icons.DrawRay[/B], };
              The Content of the control in question would be set to the string for the icon you want like shown in this example.

              Are you unable to use the icon as a content for a specific control in an addon?

              The control being used needs to allow for Fonts to be used and have the custom font as its selected font, please see this post for an example of the syntax: https://ninjatrader.com/support/foru...10&postcount=4

              I look forward to being of further assistance.
              Hi Jessie,

              I am able to implement a button for many icons such as Ray as I have defined above:


              Code:
              btnRay = new System.Windows.Controls.Button { [B]Content = NinjaTrader.Gui.Tools.Icons.DrawRay[/B], };
              Without making it too complicated please , can you provide a similar statement for a button for Chart Trader (Hidden) option Icon which is a sub-menu item in the main tool bar?

              The following:

              Code:
              btnChartTraderHidden = new System.Windows.Controls.Button { [B]Content = NinjaTrader.Gui.Tools.Icons.ChartTraderHidden[/B], };
              works fine and will draw the Icon, but because it is a sub-menu item it depends on the status of Chart Trader Icon on main toolbar. Once this button is clicked, it will hide the Chart Trader, but will not reverse the action if clicked again.

              Many Thanks
              Last edited by aligator; 12-08-2017, 07:00 PM.

              Comment


                #8
                Originally posted by ruppschtaler View Post
                Hi there,

                I'm wondering if you can provide some information how to access these custom font icons (NInjaTrader.Gui.Tools.Icons) in an Add-On by now?

                Thank you!
                ruppschtaler, Hi

                There is no such documented information available, at least not that I know.

                When I was writing the code for mahToolBar2 (https://ninjatrader.com/support/foru...ks.php?catid=7),
                I simply got the list from Ninja Inteliprompt list box here:



                So, in editor type: NInjaTrader.Gui.Tools.Icons. and simply pick the icon that you want from the drop down list box.

                Hope this help.

                Cheers!
                Last edited by aligator; 12-08-2017, 07:22 PM.

                Comment


                  #9
                  Hello aligator, Hello Jesse,
                  Just the reference to the 'IconsFamily' custom font was missing - now it's working perfect.
                  Thanks for your support!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by tkaboris, Today, 08:01 AM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by Lumbeezl, 01-11-2022, 06:50 PM
                  31 responses
                  817 views
                  1 like
                  Last Post NinjaTrader_Adrian  
                  Started by xiinteractive, 04-09-2024, 08:08 AM
                  5 responses
                  15 views
                  0 likes
                  Last Post NinjaTrader_Erick  
                  Started by swestendorf, Today, 11:14 AM
                  2 responses
                  6 views
                  0 likes
                  Last Post NinjaTrader_Kimberly  
                  Started by Mupulen, Today, 11:26 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post Mupulen
                  by Mupulen
                   
                  Working...
                  X