Announcement

Collapse
No announcement yet.

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.

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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by smcllr, Today, 04:15 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_ShawnB  
      Started by rtwave, Today, 02:33 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by mlprice12, Today, 01:43 PM
      2 responses
      6 views
      0 likes
      Last Post mlprice12  
      Started by coopgrafik, Today, 01:31 PM
      3 responses
      14 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by ARQERNES, Today, 12:08 PM
      2 responses
      19 views
      0 likes
      Last Post ARQERNES  
      Working...
      X