Kevin,
> > I'm trying to display a mailto: link in a dialog box for an application,
> and
> > after a look through the Wiki web and some fiddling with widgets, I'm
> > stumped as to how I might do this.
> >
> > How would I go about doing this?
>
> I'm not 100% sure what you mean but if you want a button to open the users
> default mail client in "compose" mode then evaluating the following should
> work. It does on my system using OutlookExpress anyway!!!
>
> ShellLibrary default shellOpen: 'mailto:
[hidden email]'
>
> If you actually want some text which looks and acts like a link in an HTML
> document then that is a bit more difficult and will need some further
> thought.
If Ian's solution isn't good enough then what I assume you want to do is
have an underlined link within some text in the dialog. The first idea that
comes to mind would be to use the "link" facilities in RTF. I'm not exactly
sure how you'd go about it but theoretically you should be able to display
links in the RichTextEdit and with a bit of work get hold of events when
these things are clicked. A peruse of MSDN might help.
http://www.msdn.microsoft.com/library/default.aspAn alternative for Dolphin 4 (how can I tempt you like this) would be to
embed a web browser control inside your dialog. You can do this using a
URLPresenter. Using this you can make the browser control display either a
URL or a piece of HTML text by setting the #value: of the presenter. In the
case of the latter you have to prefix the text (for some reason) with
"about:". Hence you might write:
urlPresenter value: 'about:<a
href="mailto:
[hidden email]">
[hidden email]</a>'
When clicked in your dialog this will launch the default mail client on the
given address.
Best regards,
Andy Bower
Object Arts Ltd.
http://www.object-arts.com"Not all addictions are bad for you"
http://www.object-arts.com/Addiction.htm