RichEditBox help

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

RichEditBox help

Post 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
edk
Posts: 997
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: RichEditBox help

Post by edk »

Maybe like in the PROCEDURE CreateTextRTF at hmg.3.4.4\SAMPLES\Controls\RichEditBox :?:
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: RichEditBox help

Post by mol »

I think it should be more simple way...
edk
Posts: 997
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: RichEditBox help

Post 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  }"
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: RichEditBox help

Post by mol »

You are great as always. I'll test it tomorrow! Thank you!
Post Reply