Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Delphi 4 RichEdit - how..

Hello!

RichEdit is not so simple thing to use as I though.

1. How can do simple line.adds with code in RichEdit box

this way:

this line is normal text(arial)
Rich.edit.lines.add ('first row')

next line is bold (TimesNewRoman)
Rich.edit.lines.add ('second row')

next line is normal text again(arial)
Rich.edit.lines.add ('third row')

----------

2. And:

How about to input the hole rtf- text to Richedits String List Editor(as a static Help text forexample).
I can see the rtf-text right (with bolds and so on) in String List Editor but when I run the program the text is normal.
What's wrong? In this case I would not like to use external rtf for input. The rtf-text should be internal.

Comments

  • Hav0c #1Hav0c #1 Member Posts: 50
    hi
    I have the same problem with delphi 7

    but how do i use richedit ?
  • jamesb800jamesb800 Member Posts: 105
    Try this
    [code]
    RichEdit1.SelAttributes.Name:='Arial';
    RichEdit1.lines.add ('first row');

    RichEdit1.SelAttributes.Name:='Times New Roman';
    RichEdit1.lines.add ('second row');

    RichEdit1.SelAttributes.Name:='Arial';
    RichEdit1.lines.add ('third row');
    [/code]

    : Hello!
    :
    : RichEdit is not so simple thing to use as I though.
    :
    : 1. How can do simple line.adds with code in RichEdit box
    :
    : this way:
    :
    : this line is normal text(arial)
    : Rich.edit.lines.add ('first row')
    :
    : next line is bold (TimesNewRoman)
    : Rich.edit.lines.add ('second row')
    :
    : next line is normal text again(arial)
    : Rich.edit.lines.add ('third row')
    :
    : ----------
    :
    : 2. And:
    :
    : How about to input the hole rtf- text to Richedits String List Editor(as a static Help text forexample).
    : I can see the rtf-text right (with bolds and so on) in String List Editor but when I run the program the text is normal.
    : What's wrong? In this case I would not like to use external rtf for input. The rtf-text should be internal.
    :
    :

Sign In or Register to comment.