-
AnsiString to TString
Hi,
A method I am calling returns an AnsiString ( from a text file), and has to be presented in a 'memo' on a form in Borland....only prob is, it only accepts Tstrings and I cant find a method to convert..??
I cant access the method itself, so need to convert once it is returned...
....as you can tell im new to Borland, so any help appreciated...
THX - I.A. - Mark :cool:
-
I donīt remember the correct syntax but I think there is a property in TMemo called TString. In that property you could acces each line with a index that returns a line in TMemo.
Se the borland helper. There is everything you need to know :).
-
You could use the WinAPI directly and an #ifdef UNICODE directive, but that would be quite complicated - there should be a better way.
-
TStrings is essentially a list of AnsiStrings. The TMemo property that ripper was getting at is Lines, so the code should be something like this:
Memo1->Lines->Add(myString);
-
good place to learn builder 6
http://www.functionx.com/bcb/