I need to clear all styles, get defaults etc.
The problem I've got is when I clear RVE and RVStyle the documents here will get fixed width ignoring window size and RVRuler doesn't helps.
Word wrap works fine if window/form size is smaller than RVE document width. And when form width is smaller then document width bottom scrollbar appears.
Here is my code to clear RVE:
Code: Select all
RichViewEdit1.Clear;
RVStyle1.TextStyles.Clear;
RVRuler1.AdjustPosition;
RichViewEdit1.ApplyStyleConversion(TEXT_APPLYSTYLE);
// This will apply my default style:
// FontInfo.FontName:=EditorFontName;
// FontInfo.Size:=EditorFontSize;
// FontInfo.Color:=DefTextColor;
// FontInfo.BackColor:=clNone;
// FontInfo.Style:=[];
// ...
// NewStyleNo:=RVStyle1.TextStyles.FindSuchStyle(StyleNo,FontInfo,RVAllFontInfoProperties);
// if NewStyleNo=-1 then begin
// RVStyle1.TextStyles.Add;
// ...