Highlight a emailAddress or webAddress in text

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Highlight a emailAddress or webAddress in text

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:18 pm

by Paul Mathews >> Mon, 23 Aug 1999 19:22:10 GMT

Is there an easy way to highlight text as an email address or
webAdress in a Jade textbox ?


Paul Mathews
pem@cmsystemsgroup.com.au
Phone: [612] (99717384) Fax[612] (99711679)
(Dee Why,Sydney,Australia)

Please visit our homepage cmsystemsgroup.com.au.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Highlight a emailAddress or webAddress in text

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:18 pm

by Wilfred Verkley >> Sun, 29 Aug 1999 0:58:07 GMT

Just set the font to be underlined, and the forecolor to be blue in the textbox properties (why doesnt jade use the font color instead of the foreColor?), and also use a different mouseCursor over the textbox maybe.

You could let the automatically jump to that web or email link by implementing the windows API call, shellExecute.

i.e

(external function definition)

//HINSTANCE ShellExecute(
//
// HWND hwnd, // handle to parent window
// LPCTSTR lpOperation, // pointer to string that specifies operation to perform
// LPCTSTR lpFile, // pointer to filename string
// LPTSTR lpParameters, // pointer to string that specifies executable-file parameters
// LPCTSTR lpDirectory, // pointer to string that specifies default directory
// INT nShowCmd // whether file is shown when opened
// );

shellExecute (hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd : Integer) is ShellExecuteA in shell32;

and the call implemented in the onClick of the text box works like:

vars
s, fn : String;
begin
s := "open";
fn := "mailto://jadesupport@discoverjade.com"; // :-)
// fn := "http://news.jadeworld.com";
call shellExecute (0, s.bufferAddress, fn.bufferAddress, 0, 0, 1);
end;

Its a nice way of implementing external links into your application.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Highlight a emailAddress or webAddress in text

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:18 pm

by Paul Mathews >> Sun, 29 Aug 1999 8:44:35 GMT

Thanks for those ideas Wilfred, I was looking for a builtin facility
to manage incoming email text which may have Html text, email and web addresses. An ocx.

The need was for incoming email text, but this would be a nice way to store notes in a jade string.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Highlight a emailAddress or webAddress in text

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:18 pm

by Eric Peachey >> Mon, 6 Sep 1999 4:45:56 GMT
Thanks for those ideas Wilfred, I was looking for a builtin facility to manage incoming email text which may have Html text, email and web addresses. An ocx.


Have a look http://www.textcontrol.com I think their control may do what you want.

Eric in Dunedin

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Highlight a emailAddress or webAddress in text

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:18 pm

by Paul Mathews >> Tue, 7 Dec 1999 17:53:01 GMT

Thanks for the TIP Eric, we had no success in trying to use it
however.

And currently on Robert Puzzers highly sensible suggestion have
decided to store all email messages with HTML format as attachments
which can be viewed via their favourite default viewer, Exlorer, Netscape, Opera whatever.

As an aside we have stopped using ole controls as such as and instead
use dynamic buttons which activate the oleObject ( why ? speed and
stops all those virus checkers from opening up until you press the button).


Paul Mathews
pem@cmsystemsgroup.com.au
Phone: [612] (99717384) Fax[612] (99711679)
(Dee Why,Sydney,Australia)

Please visit our homepage cmsystemsgroup.com.au.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: Bing [Bot] and 27 guests