thanks in advance
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Override mouse handler completely
Collapse
X
-
Override mouse handler completely
Similar issue to handling I had before, by default if you double click the indicator what ever it is, it opens up the indicator window, I subscribed to even mousebutton event and mouse event and tried to shut this off with e.handled but I just need to know which handler corresponds to opening the foresaken indicator window when you click on an indicator.
thanks in advanceTags: None
-
What I would suggest is in OnRender, you do as the first thing: if (IsInHitTest) return; then after that base.OnRender(chartControl, chartScale); and whatever else.
The hit test is how it determins whether when you click on something you're clicking on that, and if you cut it short by returning out of OnRender when it's in the hit test, it will no longer be possible to select or click on the indicator's plots.
This isn't really what you asked - you're not overriding the mouse handler - but I don't think you really want to do that - it sounds like you just want to stop it from opening the dialog.
-
Alright i got it working only when needed check it out bruce
var MAIN_WINDOW = System.Windows.Window.GetWindow (ChartControl); // Assuming ChartControl is a reference to the chart panel or control
if (MAIN_WINDOW != null)
{
MAIN_WINDOW.InputBindings.Add (new KeyBinding (ApplicationCommands.Close, new KeyGesture (Key.Escape)));
try
{
MAIN_WINDOW.CommandBindings[0].Command.Execute (null);
}
catch (Exception ex)
{
// Handle any exceptions
Console.WriteLine (ex.Message);
}
MAIN_WINDOW.InputBindings.Clear ();
}
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
652 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment