LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make Graph/Waveform plot name not editable by user

Solved!
Go to solution

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

 

JICR_1-1581483922175.png

 

 

0 Kudos
Message 1 of 16
(3,652 Views)

Try placing a transparent decoration over it.

0 Kudos
Message 2 of 16
(3,649 Views)

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.

0 Kudos
Message 3 of 16
(3,607 Views)
Solution
Accepted by JICR

There is a way...

 

It's a hack, but works. But you can never go back.

 

See this idea.

 

EDIT: The community page has been deleted. I'll see if I can dig up the VI somewhere.

 

EDIT: here it is.

Message 4 of 16
(3,603 Views)

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!

Message 5 of 16
(3,583 Views)

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

0 Kudos
Message 6 of 16
(3,014 Views)

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.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 7 of 16
(3,006 Views)

Hi,

Thank you for your quick reply.

I have already tried this. It does not work 😞

 

Muaadh

0 Kudos
Message 8 of 16
(3,004 Views)

I see. the problem is that this boolean cannot get the focus.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 9 of 16
(3,002 Views)

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.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 10 of 16
(2,989 Views)