Search the web
Sign In
New User? Sign Up
delphi-webbrowser · Delphi: Using IE's WebBrowser
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
about highlight a text   Message List  
Reply | Forward Message #10224 of 10267 |
I am compiling a demo from EmbeddedWB which is for IEHelper, in the
DocumentComplete event, I wrote a piece of code found in google to
highlight the text

const
prefix = '<span style="background-color: yellow;">';
suffix = '</span>';
var
tr: IHTMLTxtRange;
begin
tr := ((MyWB.Document AS IHTMLDocument2).body AS
IHTMLBodyElement).createTextRange;

while tr.findText('Given Text', 1, 0) do
begin
tr.pasteHTML(prefix + tr.htmlText + suffix);
end;
end;
end;

However, I found the program even don't go into the while loop, i.e.
findText actually didn't find my text (I am sure the text is there).




Thu Aug 21, 2008 5:42 am

mchakuna
Offline Offline
Send Email Send Email

Forward
Message #10224 of 10267 |
Expand Messages Author Sort by Date

I am compiling a demo from EmbeddedWB which is for IEHelper, in the DocumentComplete event, I wrote a piece of code found in google to highlight the text const...
mchakuna
Offline Send Email
Aug 22, 2008
5:52 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help