Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tooltip causes crosshair glitch

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

    #16
    Originally posted by adamus View Post
    private Control screenControl;
    I was hoping to not use a generic Control type. However, using a little brute force, it seems to be NinjaTrader.Gui.Chart.ChartCanvas

    Code:
    for (int x = 0; x <= ChartControl.Controls.Count - 1; x++)
    {
       Print(ChartControl.Controls[x].Name + " : " + ChartControl.Controls[x].GetType().ToString());
    }
    Unfortunately, it's "inaccessible due it's protection level". So, generic it is!

    I spent some time with this problem in the past (months ago) and I'm running into the same problem as before... adding a ToolTip to a IDrawObject isn't easy.

    I've been trying to put the Draw Object into some kind of container Control, that I can add a ToolTip to. No luck.

    I've tried adding a separate, invisible object that is simply in the same place as the Draw Object, but I can only get it to draw at a fixed place on the chart and not something that will move as the chart moves.

    Any suggestions?

    Daniel

    Comment


      #17
      There will be ways of doing it - in Windows, anything is possible ... but be careful, as in "give 'em enough rope and they'll hang themselves".

      I found this potential solution for you on stackexchange, if you are prepared to mess around with forms:

      I'm trying to make something like a spellchecker, that will list possible words under the current caret position. I thought I would do this by creating a tooltip, moving it according to the caret's

      Comment


        #18
        Thank you for the reply. I'm just about to give up on this...

        When dealing with forms, it's difficult to have it move and resize when the chart changes locations (which was the problem I was having before when trying to place an "invisible" object that gets triggered). I can place the object on the chart, make the tooltip appear on the object, but the object isn't anywhere near the draw object itself (since it's fixed on one spot on the chart).

        Further, I can't seem to attach any kind of mouse event handlers to these draw objects, so I can't trigger showing my own message (that's not a "tooltip" per se, but just a fixed message somewhere on the chart).

        Not sure where to go from here.

        Where's NT8?

        Daniel

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by habeebft, Today, 07:27 AM
        0 responses
        3 views
        0 likes
        Last Post habeebft  
        Started by Tim-c, Today, 03:54 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by rocketman7, Today, 01:00 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by wzgy0920, 04-23-2024, 09:53 PM
        3 responses
        76 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by JonesJoker, 04-22-2024, 12:23 PM
        9 responses
        46 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X