URL link in TRichView
Posted: Thu Nov 03, 2005 5:37 pm
I really love this component, but it has a really steep learning curve.
I have a data table with a binary field that holds Rich View data, saved from a TRichViewEdit. I can save off the data and retrieve it and all is good. If I create a URL link in the document, and try it, it links correctly. I can save it to DB, and when I retrieve it in the TRichViewEdit, it still links correctly. So far, so good. Note the editor is based in great detail on the ActionTest demo.
Now, here is the problem. If I create a link in a document and save it to the database, I also allow the user to pull that field into a TRichView for viewing only. When a field with a link is pulled into my TRichView, the link still looks like a link (blue with an underline.) However, it does not act like a link. I cannot automatically start up my browser, or go to the URL page by clicking, Ctrl-Clicking, or any other way. It looks like the 'link' itself is not really there, just the text with the underline.
When I first started testing this, reading the field into the TRichEdit caused a GPF. That problem was caused by rvoTagsArePChars being set to FALSE. That problem I figured out by scouring the help file. Setting that option value to TRUE solved the GPF problem. However, I cannot find any reference for this particular problem.
I did try to handle the events (OnReadHyperlink, OnWriteHyperlink) but neither one ever fires. I placed break points in each method, but they never were reached.
I am reasonably sure there is something simple that I am missing; any help would be appreciated!
jamie
I have a data table with a binary field that holds Rich View data, saved from a TRichViewEdit. I can save off the data and retrieve it and all is good. If I create a URL link in the document, and try it, it links correctly. I can save it to DB, and when I retrieve it in the TRichViewEdit, it still links correctly. So far, so good. Note the editor is based in great detail on the ActionTest demo.
Now, here is the problem. If I create a link in a document and save it to the database, I also allow the user to pull that field into a TRichView for viewing only. When a field with a link is pulled into my TRichView, the link still looks like a link (blue with an underline.) However, it does not act like a link. I cannot automatically start up my browser, or go to the URL page by clicking, Ctrl-Clicking, or any other way. It looks like the 'link' itself is not really there, just the text with the underline.
When I first started testing this, reading the field into the TRichEdit caused a GPF. That problem was caused by rvoTagsArePChars being set to FALSE. That problem I figured out by scouring the help file. Setting that option value to TRUE solved the GPF problem. However, I cannot find any reference for this particular problem.
I did try to handle the events (OnReadHyperlink, OnWriteHyperlink) but neither one ever fires. I placed break points in each method, but they never were reached.
I am reasonably sure there is something simple that I am missing; any help would be appreciated!
jamie