trichview.com

trichview.support




hyperlinks in table cells continued


Return to index


Author

Message

Michael Philbrick

Posted: 02/03/2005 20:27:33


Sergey,


Thanks for your previous instructions about locating and highlighting hyperlinks

in table cells. I have run into another issue. Here is my code to locate

all hyperlinks in a document:


  // mark all hyperlinks associated with the current one as selected

  id := -1;

  LockWindowUpdate(rvForm.Handle);

  repeat

    inc(id);

    rvForm.GetJumpPointLocation(id, RVFData, ItemNo);

    if ItemNo > 0 then begin

      strGroupID := PChar(RVFData.GetItemTag(ItemNo));

      IDPos := pos('~G/', strGroupID);

      if IDPos > 0 then begin

        strGroupID := copy(strGroupID, IDPos + 3, length(strGroupID));

        if strGroupID = GroupIDToMatch then begin

         // mark group hyperlink as selected

          RVFData := RVFData.Edit as TCustomRVFormattedData;

          RVFData.SetSelectionBounds(

               ItemNo, RVFData.GetOffsBeforeItem(ItemNo),

               ItemNo, RVFData.GetOffsAfterItem(ItemNo));

          MarkHyperlinkAsSelected;

        end;

      end;

    end;

  until ItemNo = -1;

  LockWindowUpdate(0);


This code works fine unless a hyperlink is up against the left border of

the table cell. In other words, there is no space or other text between the

left edge of the cell and the hyperlink. These hyperlinks are completely

skipped in the above code as if they are not hyperlinks at all. The code

finds all of the other hyperlinks, however.


I placed a space before each hyperlink and then they were all located. Is

this the only solution?


Michael Philbrick





Powered by ABC Amber Outlook Express Converter