LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

unexpected behavior in string selection start/end property?

This is quite strange to me. If you highlight some text in a combobox or a string control, the attached VI calculates the selection length propertly. But if you click off the control (thus "removing" your selection), it doesn't reset the selection length. The property still returns the same start/end values for a selection. I feel the loss of focus should set the selection start and end to 0 and 0 respectively (or end of the string, end of the string respectively). But I don't think it makes sense to keep returning the previous selection start/end values. I can pretty easily work around this by checking if the control is in focus, and if not set the cursor start and end positions to be the same. But, because there is no control focus event, I'd have to poll. Basically I'm wondering if this current functionality is expected (or more importantly, intuitive)?

 

 

0 Kudos
Message 1 of 2
(2,275 Views)

Greg,

 

I agree, this functionality does not seem intuitive. Thank you for bringing this to our attention. I will be contacting R&D to see their thoughts on expected function for this property.

 

Thank you,

Joel C

National Instruments

0 Kudos
Message 2 of 2
(2,243 Views)