LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change text within string indicator programatically.

I realize that this should be an easy operation, however I can't seem to get LabView to cooperate with me.  What I would like someone to help me with is to answer the following.  What I am trying to accomplish is to produce an error message that highlights specific words or strings with a font that is different from the rest of the error message.  Just as an example if in the message the phrase "Shutdown the Instrument prior to Exiting" comes up I would like for it to be Underlined, or Bolded, or a different Font color from the rest of the text in the message.  I have tried everything that I can think of however, either it does not work and everything remains in the dialog font or everything is changed to the new font.  Since the dialog message has to change size depending on the message, it seems like a lot of work and calculation to continually overlay one text message as transparent over the other string indicator.  I have tried using the Property Node function, the Format into String function, the XML functions, with no success.  I am sure that I am missing something very simple and obvious but after hours of trying and pulling what is left of my hair out, I am turning to someone else for direction.  I would appreciate any help that someone can suggest.  Thanks!!
0 Kudos
Message 1 of 4
(2,968 Views)

You need to set focus to the indicator then setup a Selection.Start and Selection.End. There after you can change the font properties.

Example

Hope this helps you out.
0 Kudos
Message 2 of 4
(2,951 Views)

Actually, you were part way there. What you want is the property node.

The key is selecting the text properties. Specifically, the Text>>Selection properties and the Text>>Font properties. Once you have a selection, the changes to the font will only affect the selection.


___________________
Try to take over the world!
0 Kudos
Message 3 of 4
(2,950 Views)
For an example has to how to do this, you can check this post by J.P Drolet on the LAVA Forum (this is a very nice example).

PJM


  


vipm.io | jki.net

0 Kudos
Message 4 of 4
(2,946 Views)