trichview.support
Convert text to plain |
Author |
Message |
Sebastian Keseling |
Posted: 02/24/2004 13:50:40 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