LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trapping & reading 'double-clicked' text

I have an application whereby I have individual strings of encoded text (with no embedded spaces) that are captured from a data source that I'm monitoring. Each time a new data string is captured it is displayed in a string indicator. I'd like to be able to have the user 'double-click' on any particular data string they see displayed and subsequently open another window of some sort that will decode and display information about the string that was 'double-clicked'. I'm able to trap the 'double-click' event in my WHILE LOOP by looking at one of the cluster elements in the "MODS" cluster which is labeled "Double Click". However what I can't seem to figure out is how to also read WHAT the characters are that subsequently are highlighted when the user double clicks. I could certainly have the user 'cut-and-paste' the text of interest that they want to decode but double clicking sure seems like an easy way to go. (I did something similar in the past using VB years ago.) Any suggestions how to capture this "highlighted-double-clicked" text? Thanks.
Message 1 of 4
(2,820 Views)
I'd recommend trying to use an event structure - they're specifically made for this.

Example is LV 7.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 2 of 4
(2,814 Views)
Ed,

As near as I can tell, you're already familiar with and using the Event structure and you're just trying to get at the value of the subsequently highlighted text in your string control.

Two of the properties of the string control--accessible via a Property Node or a control reference--are Text.Selection.Start and Text.Selection.End . These define the beginning and end position of the currently-highlighted text. Using these values, you can get a String Subset of the text control that is the highlighted text only.

Hope it helps,
John
Message 3 of 4
(2,811 Views)
John,
That was it. What an easy solution. I feel guilty that I asked. Thanks for accomodating my inquiry. That worked fine. FYI, when I called the NI support line and asked the same question the LV tech support person I spoke to on the phone told me this couldn't be done.
Thanks again. Much appreciated.
Ed
Message 4 of 4
(2,783 Views)