LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing graph legend font size in CVI

Is it possible to change graph legend font size (created by LGCreateLegendControl and LGInsertLegendItem command)? Thank you...
0 Kudos
Message 1 of 2
(3,191 Views)
Yes, you can use CreateMetaFont to create a new meta font name. Then, you can use LGSetLegendCtrlAttribute to set the LG_ATTR_META_FONT attribute to the new meta font name. Note: There is a mistake in the function panel for LGSetLegendCtrlAttribute, it puts in LG_ATTR_FONT instead of LG_ATTR_META_FONT, so you will have to manually edit that to get it to work.

Your code will look something like this:

CreateMetaFont ("LegFont", "Arial", 16, 0, 0, 0, 0);
LGSetLegendCtrlAttribute (panelHandle, legendCtrl, LG_ATTR_META_FONT, "LegFont");

Best Regards,

Chris Matthews
National Instruments
Message 2 of 2
(3,191 Views)