LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Uppercase Edit String control

Hi All,
I have a UIR (panel) whith "Edit String" control on it.
I need that the text will be showed only as Uppercase
(Capital Letters).
Do you know how to do that ?
0 Kudos
Message 1 of 3
(3,511 Views)
I see two different scenarios:
a) you want to show text in uppercase at the end of the editing
b) you want to display in uppercase while editing

In the first case, it's enough to create a callback for the control and retrieve its value in the commit event, then change to uppercase and then set the control with the updated string.

The second case is quite different: you may need to test in the control callback the val_changed event, retrieve the value every time the callback is triggered, convert to uppercase and then re-output the new string. It is necessary to move the cursor to the end of the string after it is outputted.
You can look at the small example attached. The callback saves the position of the caret so that the operator can add text
inside the string.

Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 3
(3,511 Views)
One of the shipping examples of CVI 6.0 does just that. It filters the keyboard events and displays all characters as upper case. Check it out at
\samples\userint\keyfiltr.prj

Good luck,
Azucena
NI
0 Kudos
Message 3 of 3
(3,511 Views)