Forum > LCL

How To Display Greek Numerals in 'Application' TEdit object?

(1/2) > >>

-Caiman-:
Hello guys, I already asked you how to display Greek numerals in the console (thx for help btw.) : http://forum.lazarus-ide.org/index.php/topic,43739.0.html
But now I cannot find the way to display UNICODEstring in TEdit object because it supports only String to display. Is there any convert function like IntToStr or library to add to make it work? Thx for answers!

CCRDude:
Are you looking for the UTF8Encode() function maybe?

-Caiman-:
I tried it now, no warning messege now but still not worked. Am I using it right?

balazsszekely:
With fpc3.0.0 + a simple assignment should be enough:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var  UStr: UnicodeString;begin   Edit1.Text := UStr;end;Are you sure that SYM is an unicodestring? Can you post a small demo application?

lucamar:
It should be converted automatically, when you assign a UnicodeString to a String; i.e. this should work without more ado:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure SetTextForEdit(AnEdit: TEdit; const AText: UnicodeString);begin  AnEdit.Text := AText;end.
I have just tested something similar (only using an Spanish test string) and it does work.

ETA: Ahh ... yeah, what GetMem said.

Navigation

[0] Message Index

[#] Next page

Go to full version