trichview.com

trichview.support




Re: GetItemAtEx


Return to index


Author

Message

Sergey Tkachenko

Posted: 09/27/2002 18:47:08


This procedure is still there.

But this procedure is rv.RVData, not of rv. It has additional parameter,

which should be False in this case.



> Hello,

>

> some days ago I found some code that allows to move the caret pos while an

> object ios dragged onto a TRichViewEdit component. Basically in the

> OnDragOver event handler a WM_SETCARETPOS is triggered which eventually

> calls a procedure similar to this:

>

> procedure MoveCaretTo(X, Y: Integer);

> var

>   RVData: TCustomRVFormattedData;

>   ItemNo, Offs: Integer;

> begin

>   inc(X, MyRichViewEdit.HScrollPos);

>   inc(Y, MyRichViewEdit.VScrollPos*MyRichViewEdit.VSmallStep);

>   MyRichViewEdit.RVData.GetItemAtEx(X,Y,RVData,ItemNo,Offs);

>   if ItemNo<0 then

>     exit;

>   if RVData is TRVTableCellData then begin

>     TRVTableCellData(RVData).Edit;

>     RVData := TCustomRVFormattedData(RVData.GetRVData);

>   end;

>   RVData.SetSelectionBounds(ItemNo, Offs, ItemNo, Offs);

>   RVData.Invalidate;

> end;

>

> When I was testing this, I used an unregistered version of TRichView.

After

> installing the registered version (1.5.4), the procedure "GetItemAtEx"

> cannot be found any more. Is there a workaround?

>

> Regards,

>

> Christian Kirchhoff

>

>





Powered by ABC Amber Outlook Express Converter