trichview.com

trichview.support




Re: Convert text to plain


Return to index


Author

Message

Sergey Tkachenko

Posted: 02/25/2004 0:34:23


Unfortunately, recursive application of list styles is not implemented.

So your code will not remove markers in table cells.


This operation will be faster if you call

LockWindowUpdate(rve.Handle) before it and LockWindowUpdate(0) after.


> Hi,

>

> I want to convert all textformatings of a TRichViewEdit to formatings from

a

> TFont (PlainFont) like the Plain-property in the Delphi-TRichEdit. Is

there

> a much more nicer way as the following? If long text is in the

RichViewEdit

> than the selection is visible for a few mseconds. Is there a way to hide

the

> blue selection?

>

>       rve.Style.TextStyles[0].Assign(PlainFont);

>

>       rve.SelectAll;

>       rve.RemoveLists(true);

>       rve.ApplyParaStyle(0);

>       rve.ApplyTextStyle(0);

>

>       RVS_ResetAll(rve.Style, true); //remove all unused styles

>

>       rve.Deselect;

>       rve.ScrollTo(0);

>       rve.Format;

>

>

> procedure RVS_ResetAll(Style: TRVStyle; OnlyNormal: Boolean);

> begin

>   if Style <> nil then

>   begin

>   Style.ResetTextStyles;

>   Style.ResetParaStyles;

>

>    if OnlyNormal then

>    begin

>      while Style.TextStyles.Count >= 2 do

>        Style.TextStyles[1].Free;

>

>      while Style.ParaStyles.Count >= 2 do

>        Style.ParaStyles[1].Free;

>     end;

>   end;

> end;

>

>





Powered by ABC Amber Outlook Express Converter