06-24-2015 11:47 AM
I have created a .NET control for use in a LabVIEW application. The control visually looks as I would expect when run outside of LabVIEW, however, when I add the control to a .NET container inside LabVIEW the graphical display changes slightly. See below for how it looks normally:
This is how LabVIEW is rendereing it:
It mostly looks like formatting differences from what I can tell (i.e. the text is italicized and rendered differently, the Message label is moved down slightly, etc.). In my particular case, formatting is important as a visual indicator to the user (and there is more to the control than what I show in the screenshots). Is it possible to render the control like it is in the first picture via LabVIEW? I have tried stopping the Windows Themes service, based on other LabVIEW help documents I found, but that didn't stop the text from being formatted differently.
Thank you in advance if anyone has any advice! Please let me know if you need any clarification.
Solved! Go to Solution.
06-25-2015 10:24 AM
Hi there,
Yes it seem to be formatting settings. Can you attached your VI to see What I can do to help you. And can you specifically write step by step what did you do, and what did you use in your VI jut to reproduce your issue
Best Regards
06-25-2015 11:21 AM
@keroba
Thanks for the response, however it won't be of any value to attach the VI in this case. The VI itself is blank except for the .NET Container.
Here is what I did:
At this point the .NET Container is holding my User Control but already the formatting issues are taking place and I haven't even run the VI yet.
06-26-2015 10:58 AM
Hi there,
Is it possible that you can attached your DLL just to simulate your issue in my computer. By the way what LabVIEW version do you have?
Regards
07-02-2015 08:49 AM
I created another DLL file for testing purposes and have attached it. See below for screenshots:
This is how the UserControl renders in Visual Studio. All text is unformatted and should look regular.
This is how the UserControl is rendered in LabVIEW. Notice the text formatting on the label and the button (the text is actually truncated on the label). Coincidentally, when you activate the Combo Box, the items in the drop down appear normal and not italicized. Likewise for the message box that appears when you click the button.
I am using .NET Framework 4.5 (in Visual Studio Professional 2012) and LabVIEW 2014 (Version 14.0f1 32-bit).
07-06-2015 06:00 PM
Hi there,
I try your dll in my computer and it works just fine.
So I tried to change the letters and I found a way to change it!
In labview, lets go to Tools>>options>>enviroment>>Fonts (scroll down to find this option)>>Application Font>> uncheck the "Use default font">> click on "Font Style">>select the style that you want>> check the "Panel default">>OK.
Doing those steps was the way that I changed the font style on the containers like the .Net container
Regards
07-08-2015 09:47 AM
@keroba, thanks for the additional followup and details. You definitely led me in the right direction with the Tools > Options > Environment > Fonts settings.
I also needed to shrink the default font size from 15 to 14 (you can see in the picture you posted that the label, although not italicized anymore, is still truncated) in order for the whole label to fit.
Not sure if there is a more "automatic" way of dealing with this but at least this is a work-around. Thanks!