trichview.com

trichview.support




Re: InsertText


Return to index


Author

Message

Sergey Tkachenko

Posted: 07/28/2004 22:30:27


Hi,


If you do not use Unicode, you must use a text style with Charset =

HEBREW_CHARSET

You can use this procedure


procedure InsertHebrewText(rve: TCustomRichViewEdit; const s: String);

var StyleNo: Integer;

begin

  StyleNo := rve.Style.TextStyles.FindStyleWithCharset(

    rve.CurTextStyleNo, HEBREW_CHARSET);

  if StyleNo<0 then begin

    rve.Style.TextStyles.Add;

    StyleNo := rve.Style.TextStyles.Count-1;

    rve.Style.TextStyles[StyleNo].Charset := HEBREW_CHARSET;

    rve.Style.TextStyles[StyleNo].Default := False;

  end;

  rve.CurTextStyleNo := StyleNo;

  rve.InsertText(s);

end;


(this procedure may add a new text style, so RichViewEdit must be in "Allow

adding styles dynamically" mode, right click it at designtime and choose

"Settings" in the context menu)


Note: in order to support Hebrew, RichViewEdit.BiDiMode must be set either

to rvbdRightToLeft or to rvbdLeftToRight.




> Hi.

>

> I am using SearchText and InsertText to replace text in my Doc, I am using

> Hebrew Language, the problem is that the new text does not appear as

Hebrew

> it appears as strange characters, Is there away to solve this problem ?

>

> Thanks.

>   Yossi.

>

>





Powered by ABC Amber Outlook Express Converter