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

Customised ToolTips in AddOn

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

    Customised ToolTips in AddOn

    I'm hesitant to post this, since it is most likely a C# WPF oddity I'm ignorant of. Nevertheless, since it remotely might be related to how NinjaTrader 8 has implemented things ... or a generous soul may answer the generic question in any case ...

    In the code of an AddOn, I'm trying to create and customise ToolTips for various objects -- Button, Label, etc. I want to change the Font characteristics (FontSize, FontFamily, etc) of the ToolTip dynamically.

    I have tried creating a new ToolTip object and adjusting those Properties on it, then setting the target object's ToolTip to the modified ToolTip, but those Properties are not changed when the ToolTip displays.

    I have tried using ToolTipService to SetToolTip to see if that affects anything -- it doesn't; although, I can change the ShowDuration with ToolTipService, so that is one win.

    Any advice would be most gratefully received.

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hello jeronymite,

    Thanks for the post.

    I don't have a sample of a tool tip to try however it is very likely that you need to set the controls style to null. The platform uses custom skins which will apply to most WPF controls. If you need to set custom values you will need to do that either from the skin, after the object is displayed(in some cases) or using a null style on the control.

    If you are using C# it would be myTooltipVariable.Style = null;
    For xaml it would be <MyTooltipControl Style="{x:Null}" />


    If that does not help and you can post a small sample that shows the tooltip in some way we could explore that further.

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

    Comment


      #3
      Perfect, Jesse! That works like a charm. Thank you so much -- you have saved me hours of time and frustration. Most grateful!
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kevinenergy, 02-17-2023, 12:42 PM
      118 responses
      2,778 views
      1 like
      Last Post kevinenergy  
      Started by briansaul, Today, 05:31 AM
      0 responses
      9 views
      0 likes
      Last Post briansaul  
      Started by traderqz, Yesterday, 12:06 AM
      11 responses
      28 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by PaulMohn, Today, 03:49 AM
      0 responses
      9 views
      0 likes
      Last Post PaulMohn  
      Started by inanazsocial, Today, 01:15 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Jason  
      Working...
      X