09-02-2009 11:23 AM
Hi all,
I am writing an application that will run on a TPC 2106T. As a part of that, I created a keyboard to type in information in string controls. Everything works fine except that as I am typing on the "virtual" keyboard, the entire text is selected as I type. I would like for the cursor to be at the end of the current string and not have the entire string highlighted. I know I can use the Text.Selection.Start and Text.Selection.End properties set to the same value to place the cursor at the end of the string. However, it seems that these two properties are not supporter in the TPC as I get an error every time I try to run the application on it.
My program works just fine without this feature, but it bugs me that the entire text is selected (When running vi on TPC). And why would these two properties not be supported on the TPC 2106T? Perhaps I am missing something?
Any help is appreciated. I an attaching keyboard file, but please not that problem occurs when running it on a TPC device. Thank you
09-03-2009 11:57 AM
Henik2,
Hello! That's a sharp looking keyboard you've written there. I ran it on a TPC 2106T and saw the same issue you were seeing. I did notice that if you touched (clicked) the text it would de-highlight the string. I know there is a way to Programmatically Simulate A Mouse Click in LabVIEW using the User32.dll. However that DLL isn't a part of windows CE, instead the mouse driver is Kbdmouse.dll. Some poking around the MSDN forumns didn't provide much information on how to use that simulate a touch, but perhaps you'll have more luck than I did.
I did however figure out a way to de-highlight the string by disabling the control and re-enabling it. Below is an attached image of this modifcation to your code. However, this does make the cursor go away. I've also attached the edited code.
09-08-2009 07:15 AM