LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I underline one or two words in the text file

I am trying to create a report from the data base I have. The report should have some titles and header underlined. I tried with the underline option under style, it puts the underlined string constants in the diagram, but when I print out the file, it is not coming underlined. If I use the option "Underline ON" from the set report font.vi, the whole file comes with the underline, which I don't need. So how do I do this. Any help would be appreciated.
0 Kudos
Message 1 of 3
(3,298 Views)
> I am trying to create a report from the data base I have. The report
> should have some titles and header underlined. I tried with the
> underline option under style, it puts the underlined string constants
> in the diagram, but when I print out the file, it is not coming
> underlined. If I use the option "Underline ON" from the set report
> font.vi, the whole file comes with the underline, which I don't need.

The string datatype only transmits ASCII characters, not formatting
info. That means that string constants, along with string controls will
be displayed according to the indicator settings, not the controls that
are appended to the string.

Now, to accomplish what I think you want, you will want to turn on the
underlining formatting option, append
the word(s), and set the
formatting again back to plain.

I'm not actually at a PC at the moment, otherwise I'd test it out, but I
believe this is the right approach.

Greg McKaskle
0 Kudos
Message 2 of 3
(3,298 Views)
Hi,

A previous thread triggered me to make a convertion VI.

It convets a string ref to a string with layout and text information (font
name/size/bold/underline/strikethrough/color, etc.).

I also made a vi that takes a string ref, and a layout string. This vi puts
the layout and text in the referenced string.

You could build the format string yourself.

An example:

"123456789"

(12 are red, the rest is black. 56 are 13pt, the rest 20pt.)

The layout string looks like:

strikeout="0" color="16727850" name="Courier New" >12>3456789

Maybe it is usefull.

Regards,

Wiebe.



"Greg McKaskle" wrote in
message
news:3D7FE743.4020707@austin.rr.com...
> > I am trying to create a report from the data base I have. The report
> > should have some titles and header underlined. I tried with the
> > underline option under style, it puts the underlined string constants
> > in the diagram, but when I print out the file, it is not coming
> > underlined. If I use the option "Underline ON" from the set report
> > font.vi, the whole file comes with the underline, which I don't need.
>
> The string datatype only transmits ASCII characters, not formatting
> info. That means that string constants, along with string controls will
> be displayed according to the indicator settings, not the controls that
> are appended to the string.
>
> Now, to accomplish what I think you want, you will want to turn on the
> underlining formatting option, append the word(s), and set the
> formatting again back to plain.
>
> I'm not actually at a PC at the moment, otherwise I'd test it out, but I
> believe this is the r
ight approach.
>
> Greg McKaskle
>
0 Kudos
Message 3 of 3
(3,298 Views)