02-11-2020 11:09 PM
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
Solved! Go to Solution.
02-11-2020 11:27 PM
Try placing a transparent decoration over it.
02-12-2020 06:30 AM
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.
02-12-2020 06:49 AM - edited 02-12-2020 06:55 AM
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.
02-12-2020 08:33 AM - edited 02-12-2020 08:49 AM
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!
04-01-2021 07:39 AM
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
04-01-2021 08:14 AM
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.
04-01-2021 08:25 AM
Hi,
Thank you for your quick reply.
I have already tried this. It does not work 😞
Muaadh
04-01-2021 08:39 AM
I see. the problem is that this boolean cannot get the focus.
04-01-2021 10:06 AM
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.