LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I highlight text control text programmatically?

Hello,

I have an application where I'm passing a string of text to a vi string control.  When the vi opens, it is written such that, programmatically, it gives the text control focus, which is working.  The control does have a border around it and it does take text from the keyboard.  The problem is, I want the text to be highlighted, so the user can replace the displayed text with the new text w/o manually deleting what is there... or the user may choose to keep the existing text.  How do I highlight the text programmatically?

Thanks.

 

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

Hi rickford66,

you can use the selection "start" and "end" property.

 

Mike

Message 2 of 5
(3,990 Views)

BTW, I am using LV 7.0.  Does 7.0 have start and end properties, I can't find them.

Thanks.

 

0 Kudos
Message 3 of 5
(3,986 Views)

Nevermind, I found them.  haha

Thanks.

0 Kudos
Message 4 of 5
(3,985 Views)

Using LabVIEW 2013, I have to set the control's KeyFocus property TRUE before setting the Numeric Text: Selection property.  This may be application specific because I'm setting the control's text selection on a Mouse Up filter event, but the cursor may not already be in the corresponding control.

-Steve K

Message 5 of 5
(3,213 Views)