RTF not working on PureBasic 6.03 LTS beta 4 on both versions.?
RTF not working on PureBasic 6.03 LTS beta 4?
RTF not working on PureBasic 6.03 LTS beta 4?
Hi.
RTF not working on PureBasic 6.03 LTS beta 4 on both versions.?
RTF not working on PureBasic 6.03 LTS beta 4 on both versions.?
Re: RTF not working on PureBasic 6.03 LTS beta 4?
Check this ...
viewtopic.php?t=81402
viewtopic.php?t=81402
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: RTF not working on PureBasic 6.03 LTS beta 4?
Ok . But it's still not working. Unless I am doing something wrong,
Code: Select all
Enumeration Window
#Window_0
EndEnumeration
Enumeration Gadgets
#Edit_1
EndEnumeration
Global AppQuit,t$
t$+"{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial Black;}{\f1\fnil\fcharset0 Calibri;}}"
t$+"{\colortbl ;\red155\green0\blue211;\red255\green255\blue0;\red255\green0\blue0;}"
t$+"{\*\generator Riched20 10.0.15063}\viewkind4\uc1"
t$+"\pard\sa200\sl276\slmult1\b\f0\fs24\lang9 Not \cf1\ul Working \cf2\ulnone On\cf1 \cf3 Beta4\b0\f1\fs22\par"
t$+"}"
Declare Open_Window_0(X = 0, Y = 0, Width = 460, Height = 110)
Procedure Open_Window_0(X = 0, Y = 0, Width = 460, Height = 110)
If OpenWindow(#Window_0, X, Y, Width, Height, "RTF Test",#PB_Window_SystemMenu| #PB_Window_ScreenCentered)
EditorGadget(#Edit_1, 10, 10, 440, 90)
EndIf
EndProcedure
Open_Window_0()
SetGadgetText(#Edit_1,t$)
SendMessage_(GadgetID(#Edit_1), #EM_SETTEXTMODE, #TM_RICHTEXT, 0)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
AppQuit = #True
EndSelect
Until AppQuit
Re: RTF not working on PureBasic 6.03 LTS beta 4?
Hi,
you have to send the TextMode before you send the text ...
... or maybe better, put it directly after EditorGadget()
like this
you have to send the TextMode before you send the text ...
Code: Select all
Enumeration Window
#Window_0
EndEnumeration
Enumeration Gadgets
#Edit_1
EndEnumeration
Global AppQuit,t$
t$+"{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial Black;}{\f1\fnil\fcharset0 Calibri;}}"
t$+"{\colortbl ;\red155\green0\blue211;\red255\green255\blue0;\red255\green0\blue0;}"
t$+"{\*\generator Riched20 10.0.15063}\viewkind4\uc1"
t$+"\pard\sa200\sl276\slmult1\b\f0\fs24\lang9 Not \cf1\ul Working \cf2\ulnone On\cf1 \cf3 Beta4\b0\f1\fs22\par"
t$+"}"
Declare Open_Window_0(X = 0, Y = 0, Width = 460, Height = 110)
Procedure Open_Window_0(X = 0, Y = 0, Width = 460, Height = 110)
If OpenWindow(#Window_0, X, Y, Width, Height, "RTF Test",#PB_Window_SystemMenu| #PB_Window_ScreenCentered)
EditorGadget(#Edit_1, 10, 10, 440, 90)
EndIf
EndProcedure
Open_Window_0()
SendMessage_(GadgetID(#Edit_1), #EM_SETTEXTMODE, #TM_RICHTEXT, 0) ; first command
SetGadgetText(#Edit_1,t$) ; second
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
AppQuit = #True
EndSelect
Until AppQuit
... or maybe better, put it directly after EditorGadget()
like this
Code: Select all
; ...
If OpenWindow(#Window_0, X, Y, Width, Height, "RTF Test",#PB_Window_SystemMenu| #PB_Window_ScreenCentered)
if EditorGadget(#Edit_1, 10, 10, 440, 90)
SendMessage_(GadgetID(#Edit_1), #EM_SETTEXTMODE, #TM_RICHTEXT, 0)
EndIf
EndIf
; ...
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: RTF not working on PureBasic 6.03 LTS beta 4?
Ok. Thank you.
I initially was trying to open a RTF file onto the EditorGadget, but couldn't figure out why it wasn't working.


