LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

inquiry of notepad font

I am not sure if my approach is right.

To resolve the inharmony of column alignment between Labview string control and notepad, I want to display string control in the same font with that of notepad.

How can I get the notepad font (or windows default font) information programmatically?

 

labmaster

0 Kudos
Message 1 of 5
(3,754 Views)

I have found you a way to do it via winapi methods, it is in #6, and it is programmed in some kind of C

http://forums.codeguru.com/showthread.php?510521-Current-window-font

(I haven't tried it)

__________________
Engage! using LV2015
0 Kudos
Message 2 of 5
(3,737 Views)
I don't think that using the same font is going to do anything for aligning columns. Notepad will show a tab as x number of spaces and the LabVIEW string control will just display a single space. If you need columns to line up in LabVIEW, use an array indicator or convert all to strings and use a table. The spreadsheet String to Array will be used for this.
0 Kudos
Message 3 of 5
(3,731 Views)

HI Dennis,

 

I remember you for a long time and it's honor to meet you in my question.

 

My data file is rather complicated to present by array or table because it contains many other kind of data.

Can you let me know how to get the current windows font?

0 Kudos
Message 4 of 5
(3,721 Views)
You've been told about the winapi and I've said the font will not affect alignment. Converting all data to strings is trivial and I suspect it's something you are already doing in order to create the text file.
0 Kudos
Message 5 of 5
(3,709 Views)