Hypertext behavior of TppDBText
I'm looking for a way to redirect the field's Hypertext behavior for
e-mails. In our application, we use an internally-configured SMTP client
to send e-mails. However, a text field in the Previewer, with its
Hypertext Enabled property set, attempts to send the field content to a
default browser or email, with no opportunity to handle what happens. On
a box with no default email, it sends "mailto: to the
browser's URL.
Is there any way to intercept this behavior and redirect the email via
the internal SMTP Client? We're using Clever Controls' SMTP objects, and
have had satisfactory results.
Thanks,
Lane Campbell
lcampbell@nwsoftware.com
e-mails. In our application, we use an internally-configured SMTP client
to send e-mails. However, a text field in the Previewer, with its
Hypertext Enabled property set, attempts to send the field content to a
default browser or email, with no opportunity to handle what happens. On
a box with no default email, it sends "mailto: to the
browser's URL.
Is there any way to intercept this behavior and redirect the email via
the internal SMTP Client? We're using Clever Controls' SMTP objects, and
have had satisfactory results.
Thanks,
Lane Campbell
lcampbell@nwsoftware.com
This discussion has been closed.
Comments
When the HyperLink property is defined, the drawcommand automatically
becomes clickable and a ShellExecute is called for the hyperlink if valid.
To completely customize this process, you can implement the
OnDrawCommandClick event and perform any task(s) you need when the item
is clicked. In this case you would want to disable hyperlinks.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I've tried the OnDrawCommandClick; but I'm still not able from that
event-handler to get to the content of the field clicked. Specifically,
it's a TppVariable field whose content is generated by its OnCalc
handler. How do I connect the two to get the actual field content?
Thanks in advance,
Lane Campbell
NW Software
January 16th.
---
Hi Lane,
You can use the Tag property of the DrawCommand to "attach" data to the
clickable object. Assign the Tag property in the OnDrawCommandCreate
event and access it in the OnDrawCommandClick. See the following
article on how this can be done.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Formatting/How_To..Clickable_DrawCommand_with_Custom_Info
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com