09-27-2012 04:32 PM - edited 09-27-2012 04:34 PM
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)?
09-28-2012 03:47 PM
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