trichview.com

trichview.support




working with selection


Return to index


Author

Message

Yura

Posted: 07/22/2004 19:52:55


Hello


I use the following event handler in editor:


procedure TmyRTF.myCaretMove(Sender: TObject);

begin

  if not bTagProcessing then begin

    bTagProcessing := True;

    try

      BeginUpdate;

      CheckForTag(1);

      EndUpdate;

    finally

      bTagProcessing := False;

    end;

  end;

end;


and CheckForTag does the following:

function TmyRTF.CheckForTag(iMode: Integer): Boolean;

var

  itmS, offsS, itmE, offsE, itmCur, offsCur: Integer;

  tStr: String;

begin

  Result := False;

  GetSelectionBounds(itmS, offsS, itmE, offsE, True);

// some code including SelectCurrentWord, GetSelText, SetSelectionBounds...

  SetSelectionBounds(itmS, offsS, itmE, offsE);

end;


But cursor doesn't move and selection doesn't exist when I press Shift +

Right arrow... Can you tell me why?





Powered by ABC Amber Outlook Express Converter