trichview.com

trichview.support




Re: Using the GetWordAt method


Return to index


Author

Message

Peter Jordan

Posted: 10/26/2004 2:07:47


Sergey,


thanks for your reply. But actually I am using the MouseMove event for RichViewEdit

component. And this event does not have the ItemNo parameter. Is there a

solution for this case ?


Peter.


"Sergey Tkachenko" <svt@trichview.com> wrote:

>> Hello,

>>

>> passing the X and Y coordinates to GetWordAt method we can get the word

of

>> RichView from the mouse position.

>> Is there a way to get the attributes styles for this word ? I mean, if

the

>> word is in bold format how could I know it by this method ?

>

>There are two versions of this method:

>

>1) procedure GetWordAt(X,Y: Integer;

>  var RVData: TCustomRVFormattedData; var ItemNo: Integer;

>  var Word: String);

>2) function GetWordAt(X,Y: Integer): String;

>

>Using (1), you can get a text style:

>

>rv.GetWordAt(X,Y, RVData, ItemNo, wrd);

>if (ItemNo<0) or (RVData.GetItemStyle(ItemNo)<0) then

>  exit;

>StyleNo := RVData.GetItemStyle(ItemNo);

>

>StyleNo is an index in the collection of RVStyle.TextStyles defining a font

>of the given word.

>

>> And another question, I need the words like "Left/Right/Double" as a

>single

>> word. When the mouse is over "Left" (or Right or Double) word I need to

>get

>> the entire phrase as "Left/Right/Double".

>

>Exclude '/' from the Delimiters property.

>

>





Powered by ABC Amber Outlook Express Converter