Page 5 of 6
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Tue Aug 30, 2016 12:28 pm
by bbanelli
Greetings to all, I'm having much difficulties with this RichEdit concept, perhaps I'm missing something:
Example used with modules here:
http://www.realsource.de/downloads/doc_ ... edit-class
IMA's happens on defined RichEdit variables but not initialized by New_RichEdit. So, I'm having a large GUI where gadgets get created dynamically and only if needed. Naturally, EventGadget() that are not created are not fired at all, but for some reason, putting Case Edit\GetID() when Edit is not set with New_RichEdit fires IMA. Is there another approach to this issue? You can try this in RichEdit_Example.pb in last download file. If you comment out lines related to Edit = RichEdit::New_RichEdit and create any other gadget (for example, I added String gadget), compiling triggers IMA automatically, under the Select EventGadget() and Case Edit\GetID() part.
In addition, how can I catch events in RichEditor gadget with GetActiveGadget()? It doesn't seem to be triggered by something like GetActiveGadget() = Edit\GetID()...
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Tue Aug 08, 2017 7:29 pm
by IdeasVacuum
Broken link Thomas?
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Wed Aug 09, 2017 7:52 am
by RSBasic
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Sat Aug 12, 2017 3:10 am
by IdeasVacuum
Thanks RS

Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Sun Feb 23, 2020 5:10 pm
by cyril
Hi
I've started using your richedit.pbi version 2.4.
But I've noticed what seems a bug:
When I call the RichEdit's Clear function, the text alignment and the bullet stay.
Here is a code to test this which shows the problem:
Code: Select all
XIncludeFile "RichEdit.pbi"
UseModule RichEdit
Global RTFEditor.RichEdit
If OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 480, "RichEdit test",
#PB_Window_SystemMenu | #PB_Window_ScreenCentered)
RTFEditor = New_RichEdit(0, 0, 640, 480)
RTFEditor\SetAlignment(#PFA_RIGHT)
RTFEditor\SetBulleted()
RTFEditor\Clear()
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Unless I'm missing something, there is no way to reset the RTFModified status and the Bulleted state.
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Sun Feb 23, 2020 7:19 pm
by cyril
I've made some modification to take in consideration my needs.
Here is the modified and added code:
Code: Select all
; Added
Procedure.i RichEdit_GetBulleted(*this.RichEditClassTemplate)
Protected format.PARAFORMAT
format\cbSize = SizeOf(PARAFORMAT)
format\dwMask = #PFM_NUMBERING
format\wNumbering = #PFN_BULLET
;Read first
SendMessage_(*this\hWnd, #EM_GETPARAFORMAT, 0, @format)
ProcedureReturn format\wNumbering
EndProcedure
; Modified
Procedure.i RichEdit_SetBulleted(*this.RichEditClassTemplate, numbering.i = #PFN_BULLET)
; Description .......: Start / Change Slection to Bulleting
Protected format.PARAFORMAT
format\cbSize = SizeOf(PARAFORMAT)
format\dwMask = #PFM_NUMBERING
format\wNumbering = #PFN_BULLET
;Read first
SendMessage_(*this\hWnd, #EM_GETPARAFORMAT, 0, @format)
format\dwMask = #PFM_NUMBERING
format\wNumbering = numbering
ProcedureReturn SendMessage_(*this\hWnd, #EM_SETPARAFORMAT, 0, @format)
EndProcedure
for the SetModified function, I made a parameter, which was hidden, apparent in the list of function :
SetBulleted has an added parameter too:
Code: Select all
SetBulleted.i(numbering.i = #PFN_BULLET)
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Sat Oct 08, 2022 12:39 am
by siesit
Please help friends.
I really like this module, but there is a crash during printing if the document has a table in which a line break occurs.
I don't know how to fix it

Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Sat Oct 08, 2022 2:46 am
by BarryG
ts-soft wrote: Wed Jul 20, 2011 12:40 amDownload with beginnerfriendly example here:
Download
Can't download; it wants me to sign up? Can you post it elsewhere? Thanks.
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Sat Oct 08, 2022 11:14 pm
by siesit
BarryG wrote: Sat Oct 08, 2022 2:46 am
Can't download; it wants me to sign up? Can you post it elsewhere? Thanks.
I downloaded the latest version from here
http://www.rsbasic.de/backupprogramme/temp/RichEdit.zip
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Sun Oct 09, 2022 1:54 am
by BarryG
Thanks, siesit!
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Tue Oct 11, 2022 10:43 pm
by siesit
New problem.
on windows 10 tables from opened .rtf files are not displayed
siesit wrote: Sat Oct 08, 2022 12:39 am
Please help friends.
I really like this module, but there is a crash during printing if the document has a table in which a line break occurs.
I don't know how to fix it
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Mon Oct 16, 2023 11:23 am
by Karellen
Hello there,
I use this great module for several projects. With new PB-Versions I have the following problems:
PB 6.01 LTS:
Spell checking shows a black underline instead of the wavy red line.
PB 6.03 LTS:
Spell checking, text alignment and custom fonts don't work anymore.
My OS is Win 11.
Does anybody have a clue?
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Wed Nov 08, 2023 4:28 pm
by OldSkoolGamer
I also have an issue with this and the latest PB6.03, if you try to catchRTF a stored image in memory it just says "The system cannot find the file specified" Out of my expertise to fix or know what to look at.
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Wed Nov 08, 2023 5:19 pm
by Fred
You need to enable the RTF mode for the editogadget. Put this code after the line '\hWnd = GadgetID(\ID)':
Code: Select all
SendMessage_(\hWnd, #EM_SETTEXTMODE, #TM_RICHTEXT, 0)
Re: RichEdit Functions (OOP) New: with Image-Support
Posted: Wed Nov 08, 2023 5:52 pm
by Axolotl
and in the responsible procedure there is an 'unknown' value added to the structure member
Code: Select all
RichEdit_SetUnderlineWave(*this.RichEditClassTemplate)
; ...
format\bUnderlineType = #CFU_UNDERLINEWAVE ;| $50 ; <-- maybe this is the hack to get the RED (in older versions) ????
; ...
The MSDN shows some more structue members like
And the color RED is defined like UnderlineColor_Red = 0x05, but that could also be a coincidence.
just my two cents.....