I just found out that the UITextView is also capable of displyaing RTF text, but you need to set its SetRichText method in order to enable it to display the rtf text.
However the DPF UiTextView component does not have this setrichtext method. Is it possible to import it?
I haven´t tested this feature, but i got it from this apple site below https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TextUILayer/Tasks/PlainRichText.html
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everybody.
I need to show a rtf text i get from a webservice, and i found out that the webView LoadData method can do this.
I got this code below from a .net app i am migrating to delphi, and it loads the rtf text into the webview:
string strRTF = item["TEXTO"].ToString ();
strRTF = strRTF.Replace ("<CR><LF>","\r\n");
NSData nsd = NSData.FromString (strRTF);
string basedir = Environment.GetFolderPath (System.Environment.SpecialFolder.Personal);
basedir = System.IO.Path.Combine (basedir, "..", "myapp.app"); // USE YOUR APP BUNDLE NAME
WebV.LoadData ( nsd,"text/rtf","utf-8", new NSUrl("http://localhost/"));
WebV.Hidden = false;
WebV.ScalesPageToFit = true;
Do you think it is possible to add thie LoadData to the DPF DPFWeb component?
thank you for your components, they are great!
Lucio
I just found out that the UITextView is also capable of displyaing RTF text, but you need to set its SetRichText method in order to enable it to display the rtf text.
However the DPF UiTextView component does not have this setrichtext method. Is it possible to import it?
I haven´t tested this feature, but i got it from this apple site below
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TextUILayer/Tasks/PlainRichText.html