I just found out it is possible for user to edit the plot name on the Graph control. It is awkward since the user trying that might expect the software to somehow do something to the settings of the channel behind the plot.
I don't want to disable the plot legend since I use the visibility checkbox and other plot attributes.
Is there a way to block user typing something in there? It should just be an indicator or caption.
Also I noticed the Plot Attribute Change Event won't trigger on Plot rename, so I'd need to poll the property to determine if it got changed which is unlikely what I'm planning to do.
Cheers,
Jimmy
已解决! 转到解答。
Hum not sure, the Pane is resizable, the graph Fit to Pane... I have a feeling the decoration will not stick to the plot names.
There is a way...
It's a hack, but works. But you can never go back.
EDIT: The community page has been deleted. I'll see if I can dig up the VI somewhere.
EDIT: here it is.
Great hack, thanks a lot for harvesting the VI 🙂
I got worried that I would need to perform this for every plots, but no. It does it to every plots labels!
Hi,
Thank you for the brilliant solution. I have tested this and it works wonderfully.
However, I have a question: Can I use this VI for disabling plot properties (See image)?
If yes, how does that work?
How can I do that?. I have not managed 😞
Thanks for your feedback
Muaadh
According to the context help, the Plot Legend is an array of clusters, each with a string (the plot name) and two booleans (one is the visibility checkbox). I guess that casting to a boolean reference instead of a string would do the job.
I see. the problem is that this boolean cannot get the focus.
It's possible to get the boolean reference but disabling it does nothing. The LabVIEW runtime seems to hook the mouse clicks in the boolean control area.