NinjaScript > Language Reference > Drawing >

InHitTest

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Qualifies if object drawn in custom Plot method should be selectable in the indicator's hit test procedure. The hit test procedure determines whether where your mouse is clicking will select the indicator or not.

 

NOTE: Please see the CustomPlotSample indicator for an example.

 

Syntax

InHitTest

 

 

Examples

public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)

{

    // Only draws a rectangle that covers the panel canvas when the indicator is not going through the hit test procedure.

    // This effectively prevents clicking on the area with the custom rectangle from actually selecting the indicator.

    if (!InHitTest)

         graphics.FillRectangle(someBrush, new Rectangle (0, 0, 2000, 2000));

}