How to forbidden left and right mouse event on vtkMRMLMarkupsLineNode

i made a line node like the picture
and i want the line node to not react on mouse left and mouse right event
how to do it in the C++ or python Code?

You can lock the markups node to prevent interaction.

From the Markups module:


From Python/C++:


thank you ,it’s very useful for me