trichview.com

trichview.support




Re: problems in DBRichViewEdit and the first line


Return to index


Author

Message

Sergey Tkachenko

Posted: 11/26/2002 22:26:44


Use the following code:


    DM.SettingsQuery.Edit;

    SettingsForm.Headerrve.Clear;

    SettingsForm.Headerrve.LoadRTF('C:\Header.rtf');

    SettingsForm.Headerrve.Change;

    DM.SettingsQuery.Post;


(

by the way, your code is redundant, since InsertRTFFromFileEd is an

editor-style method, it's enough to write 2 lines:

  SettingsForm.Headerrve.InsertRTFFromFileEd('C:\Header.rtf');

  DM.SettingsQuery.Post;

)


The reason of problem with the first line: when inserting, RichViewEdit

keeps paragraph formatting of the first paragraph.

Since version 1.6.56, this problem solved - when inseting in the empty line,

editor takes paragraph attributes from the inserted document.



> Hello! I am using a DBRichViewEdit to load an .rtf file, but the first

line

> does not format correctly???

>

> It's centered in the .rtf file, but not after I load it into the

> DBRichViewEdit,... If I move it down one line, it's OK...

>

> What could I be doing wrong that would cause just the first line not to

> format correctly?  Here's my code...

>

>

>     DM.SettingsQuery.Edit;

>     SettingsForm.Headerrve.Clear;

>     SettingsForm.Headerrve.Change;

>     SettingsForm.Headerrve.InsertRTFFromFileEd('C:\Header.rtf');

>     SettingsForm.Headerrve.Format;

>     DM.SettingsQuery.Post;

>

>

> Thanks for any ideas!

>

> Jamie

>

>





Powered by ABC Amber Outlook Express Converter