Page 1 of 1

RichEditBox help

Posted: Sat Nov 07, 2020 7:25 pm
by mol
Where can I find more info about RichEditBox?

For now, I want to define control with 3 lines of text.
First should be centered and bold
Second and third right aligned with eventually italic.

When I'm trying to set Value to
"\par\qc\b" + cFirstLine +"\par\b0" +CRLF+ "\par\qr" + cSecondLine+CRLF + CThirdLine + "\par"

my control treats all characters literal, not as RFT markers

Re: RichEditBox help

Posted: Sat Nov 07, 2020 7:55 pm
by edk
Maybe like in the PROCEDURE CreateTextRTF at hmg.3.4.4\SAMPLES\Controls\RichEditBox :?:

Re: RichEditBox help

Posted: Sat Nov 07, 2020 8:17 pm
by mol
I think it should be more simple way...

Re: RichEditBox help

Posted: Sat Nov 07, 2020 9:27 pm
by edk
mol wrote: Sat Nov 07, 2020 8:17 pm I think it should be more simple way...
Try this:

Code: Select all

Form_1.RichEditBox_1.RTFTextMode := .T.
Form_1.RichEditBox_1.Value := "{\rtf1 \pard\qc\b " + "Bold and centered" + " \par\b0" + CRLF + "\pard\qr " + "Right 2-nd line " + "\par"  + CRLF + "\i " + "Italic 3-rd line" + " \i0\par  }"

Re: RichEditBox help

Posted: Sat Nov 07, 2020 9:42 pm
by mol
You are great as always. I'll test it tomorrow! Thank you!