bmoyer Posted April 4, 2011 Report Share Posted April 4, 2011 I'm trying to create/access a dialog to allow the user to select which font they would like to use so that I can then change some front panel controls based on their selection. Does anyone know how to do this? Thanks, Bruce Quote Link to comment
Rolf Kalbermatter Posted April 4, 2011 Report Share Posted April 4, 2011 I'm trying to create/access a dialog to allow the user to select which font they would like to use so that I can then change some front panel controls based on their selection. Does anyone know how to do this? I assume you would want to display a selection box with all the possible fonts listed. And I have to inform you that despite very deep searching in the depths of LabVIEW's basement and attic, I have not found a way to get this information during runtime into an application. My detective work has been carried out 2 or so years ago, so there is a small change that 2009 or 2010 have some hidden possibility for this, but I somehow doubt it. Quote Link to comment
bmoyer Posted April 4, 2011 Author Report Share Posted April 4, 2011 (edited) Thanks for your input. Yes, that's what I was thinking. Just using the Fonts folder filenames doesn't work. You need the actual font names. I would think that this functionality would be "built-in" to LabVIEW by now. I guess I could try looking into using .NET methods to do this (this is how I implement a print dialog), but not sure if this will be easy or not. I think the Report Generation Toolkit used to have a way to open a font dialog (Report_Font_wizard.vi), but this is disabled and when I try to enable it gives an error (Class is not licensed for use in Report_Font_wizard.vi->Set Report Font.vi->Untitled 1.). Bruce Edited April 4, 2011 by bmoyer Quote Link to comment
bmoyer Posted April 4, 2011 Author Report Share Posted April 4, 2011 I was successful at implementing a .NET call. I've attached the VIs to do this. So that the dialog is associated with your GUI, there's inputs for the "Ref to GUI" and "Make This VIs Front Panel the Parent?". Bruce Win Font Dialog (.NET).zip Quote Link to comment
Rolf Kalbermatter Posted April 5, 2011 Report Share Posted April 5, 2011 I was successful at implementing a .NET call. I've attached the VIs to do this. So that the dialog is associated with your GUI, there's inputs for the "Ref to GUI" and "Make This VIs Front Panel the Parent?". Bruce A well, .Net. Always a possibility but annoying to use. In my searchs I have found that LabVIEW 3.x and 4.x did export a C manager function that would have allowed to do that in a CIN and after 5.0 with a Call Library Node but alas, the LabVIEW Gods at that time decided that this was an unneccessary private API and they removed it. Quote Link to comment
Ton Plomp Posted April 6, 2011 Report Share Posted April 6, 2011 The Boolean XControl has a font-dialog that only works on Windows. However you can make it work on other OS's, it only needs a list of font-names. Ton Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.