Re: RVE right click

Return to index



Sergey Tkachenko

Posted: 09/09/2004 21:14:40

It's Unicode text encoded in single-byte string - two adjacent characters

(for example, 't'#0) represent one Unicode character. In TRichView

terminology, it's called "raw Unicode".

It happens when you click Unicode text.

How to get AnsiString:

uses RVUni;

procedure TForm3.RichViewEdit1RVRightClick(Sender: TCustomRichView;

  ClickedWord: String; Style, X, Y: Integer);


  if (Style>=0) and Sender.Style.TextStyles[Style].Unicode then

    ClickedWord := RVU_UnicodeToAnsi(Sender.RVData.GetStyleCodePage(Style),


  // do something with ClickedWord


Note: if text is multilingual, conversion Unicode to Ansi may be lossy.

> I have handle the OnRVRightClick event. After entering word for example

> Test, the ClickedWord show something like this


> 't'#0'e'#0's'#0't'#0


> why?



Powered by ABC Amber Outlook Express Converter