06-26-2024 05:22 PM
I created a utility that plots multiple curves on an XY Graph and exports the image so it can be used for presentation. Sometimes we have very long descriptors for the individual plots, and I have been trying to add a control for the text font size of plots in the legend in run-time.
I have added these controls for all other aspects of the graph (X & Y labels, scales, titles) but cannot find the property to control specifically the font size of the legend entries.
Is it true what I have been told by family members, and just don't look very hard for some things that are clear and obvious???
06-26-2024 06:24 PM
06-27-2024 10:52 AM
Hi,
Add this key to your LabVIEW.ini and restart LabVIEW:
AdvancedPlotLegendMenu=True
Then you can right-click your legend and create a reference / property node / invoke node to it:
If you create a reference, you will get an unnamed Array reference.
By inspecting its element, then the cluster elements, you can get the ref to the plot name string:
See this thread for more infos:
Regards,
Raphaël.
07-01-2024 02:56 PM
Thank you very much! This worked perfectly, but what a lot of work just to change a font size. I am really surprised that this has not ever been addressed before.
07-02-2024 03:51 AM
@Blocks wrote:
Thank you very much! This worked perfectly, but what a lot of work just to change a font size. I am really surprised that this has not ever been addressed before.
Usually you just select the text and change it through the font dialog. Having to change it as it's running is uncommon.
07-02-2024 06:16 AM - edited 07-02-2024 06:17 AM
Agree, LabVIEW often has these kind of limitations when you try to do "too specific" things, especially for GUI customization.
As said by Yamaeda, doing it at edit-time is sufficient 99% of the time. If you really try to have a dynamic GUI that adapts to screen resolution, be ready to hit other limitations of this kind, because LabVIEW was really not designed to make responsive GUIs.
@Blocks wrote:
what a lot of work just to change a font size.
Generally, I'm happy that a solution exists at all, and actually not so complicated.
Don't forget to "Accept as solution" if a comment solves your problem and/or "Kudo" comment(s) that are helpful.
Regards,
Raphaël.