MaxGUI:Unicode in Text Box
BlitzMax Forums/BlitzMax Programming/MaxGUI:Unicode in Text Box
| ||
Skid, Consider the following program: Strict Local win:TGadget=CreateWindow("Unicode Test",200,200,300,230) Local editBox1:TGadget=CreateTextArea(5,5,290,95,win) Local editBox2:TGadget=CreateTextArea(5,105,290,95,win) Local finished:Int=False Local tmp:String Repeat WaitEvent Select EventID() Case EVENT_WINDOWCLOSE finished=True Case EVENT_GADGETACTION Select EventSource() Case editBox1 SetGadgetText editBox2,TextAreaText(editBox1) End Select End Select Until finished A simple little program, to copy text from one text area to another. Now, find some unicode text on the web somewhere , copy the text and paste it into the first text area. Somewhere along the line, it's unicodeness is getting lost, either within the TextAreaText function or the SetGadgetText function. Any ideas? Thanks, Neil |
| ||
I think this *might* be releated to the font the user is currently using. Have you tried setting another front yet? |
| ||
@Grisu, I think this *might* be releated to the font the user is currently using. Have you tried setting another front yet? I did. Actually, re-reading the docs, I noticed a bug(?) in the above code. I set the text area text using SetGadgetText. There is also SetTextAreaText, and, son-of-a-gun, it worked as expected! So, that solves my immediate problem (I think) but I believe that SetGadgetText should respect unicode, so the bug report should stand. |
| ||
Better unicode support is due for Windows MaxGUI stuff, until then SetGadgetText is unfortunately ascii only for win32. |