08-05-2021 10:31 PM
I'm having issues with unicode in labview with string controllers.
I want to be able to type english and chinese together in a single control and being able to backspace.
ex)
However when I'm using Force Unicode Text, the english letter became represented as UTF16LE and requires me to backspace twice to delete a single letter. If i only delete once, it screws up the whole input.
ex) deleting the space between a and s
would return ???
I've found that I could use Update Value While Typing with NI Update String in the Value Changed Event
This lets me input/backspace properly, but it also caused more bugs with the font size resizing and becoming double lined when entering long strings.
As well as scrambled overlapped characters and the display remains on the first line eventho multiple lines were entered.
Currently I have set the following
Event: SControl -> Mouse Down
Can anyone help?
Solved! Go to Solution.
08-08-2021 07:45 PM
bump
08-09-2021 09:37 AM
I had similar problem 2 years ago when creating a GUI for a customer's Russia branch.
I can't make a unicode string input work for both cases.
Maybe you can try to use 2 string inputs, one for ASCII, another for Chinese.
Let user choose which language he wants. then you can show/hide string controls.
08-09-2021 10:56 PM
Yeah that sounds ok, but my client wants chinese/english mixed in without having a set structure as to which language goes where in the string.
The force unicode seems to create so many bugs, from cursor position, overlapping text, font resizing and etc.
This is really frustrating with how something that is so basic is not supported nor is there any solution to it...
08-09-2021 11:26 PM
> but my client wants chinese/english mixed in without having a set structure as to which language goes where in the string.
How about a .Net Textbox?
08-10-2021 01:31 AM
Do you have any example vi of how to use/set a .Net Textbox to take chinese and english charc?
Haven't used .net with labview before and I can't seem to set the font to the textbox property.
Thanks
08-10-2021 05:01 PM
Just drop a RichTextBox on the FP. It's a ctrl, user type Chinese or English in the box. Just like a string control, no code needed for input.
You can use a property node to read the user input.
08-11-2021 03:02 AM
Ok thnx, using a .net rich text box fixed all my issues with displaying in a text control.