Hi:
I am working on an application, lots of the UI elements will be in a TWebBrowser. So I thought I add a JQUERY UI to make it easy for me.
I was able to insert JQuery and UI javascript file thanks to http://www.jasontpenny.com/blog/2008/11/21/jquery-in-a-twebbrowser-in-a-self-contained-delphi-app/
I am stuck at stylesheets, I did
doc2 := Web.Document as IHTMLDocument2;
doc2.createStyleSheet(FileProtocol(AppPath( 'templates\css\' + JQueryUITheme + '\jquery-ui-1.7.1.custom.css')), 0);
// FileProtocol and AppPath are to return a current application path and converted to FileProtocol URL format.
the Javascripts ran fine, but I unable to get the images to work. I also tried to StringReplace all images references, but no result.
stylesheet.cssText := StringReplace(stylesheet.cssText,
'url(images/','url(' + FileProtocol(AppPath('templates/css/' +
JQueryUITheme + '/images/')), [rfReplaceAll]);
Anyone tried something similar?