Das Verfahren für Anfänger, wie man den RTF-Text bekommt, ist hier beschrieben:
http://www.purebasic.fr/german/viewtopic.php?t=9581
Tipp: Sonderzeichen, wie z.B. japanische Texte kann man sich z.B. von Webseiten in das Wordpad mit copy and paste einkopieren.
Code: Alles auswählen
; PB 4.0
OpenWindow(0, 200, 200, 400, 200,"EditorGadget", #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget)
CreateGadgetList(WindowID(0))
EditorGadget(0, 0, 0, WindowWidth(0), WindowHeight(0))
text$ = "{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\fmodern\fprq1\fcharset128 MS Mincho;}{\f2\fmodern\fprq1\fcharset178 Courier New;}{\f3\fswiss\fprq2\fcharset0 Arial;}}"
text$ = text$ + "{\colortbl ;\red0\green0\blue0;}"
text$ = text$ + "\viewkind4\uc1\pard\ltrpar\cf1\f0\fs20 T\'fcrkisch: \'e7a\u287?\u305?r\u305?nak\par "
text$ = text$ + "\cf0 Japanisch: \f1\'90\'46\'82\'cd\'93\'f5\'82\'d6\'82\'c7\f0\par "
text$ = text$ + "Arabisch: \f2\rtlch\'da\'d1\'c8\'ed\'c9\par "
text$ = text$ + "\cf1\f0\ltrch Unicode: \u264?\u284?\u292?\u308?\u348?\u364?\u265?\u285?\u293?\u309?\u349?\u365?\cf0\f3\par "
text$ = text$ + "}"
SetGadgetText(0, text$)
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
***************************
Eine andere Lösung kommt von Falko und ist hier zu finden:
http://www.purebasic.fr/german/viewtopi ... itorgadget