trichview.com

trichview.support




Re: Select an item


Return to index


Author

Message

Benedikt Weber

Posted: 09/15/2002 21:49:50


"Sergey Tkachenko" <[email protected]> wrote in message

news:[email protected]...

> Use OnRVMouseUp.


I don't understand it, but it works.


> PS: When you'll click in table, the whole table will be selected (in older

> version of RV, this may cause AV);

> To prevent this (select text in table cell instead), use

> rv_editor->TopLevelEditor instead of rv_editor


I use whole tables, so selecting the whole table is fine (as long as there

is no AV)


Thanks


Benedikt



> > > To select an item when the user clicks in the document I tried the

> > following:

> >

> > void __fastcall TReportForm1::rv_editorClick(TObject *Sender)

> > {

> >      int item= rv_editor->CurItemNo;

> >      int offsBefore= rv_editor->GetOffsBeforeItem(item);

> >      int offsAfter= rv_editor->GetOffsAfterItem(item);

> >      rv_editor->SetSelectionBounds(item, offsBefore, item, offsAfter);

> > }

> >

> > However the result is not as expected: The selection is from the

beginnig

> of

> > the item up to the cursor (the click point) instead of up to the end of

> the

> > item. What went wrong here?

> >

> > Benedikt

> >

> >

>

>





Powered by ABC Amber Outlook Express Converter