PDA

View Full Version : Many different On link events in one rich text - how?


Aleksandar
01-20-2008, 02:09 PM
I have tried a lot, but still cannot figure out how script would be look like to distinguish between many hyperlinks in one rich text object.
When a user click on one link it should open his default browser and go to that web page.
When he click's on another, than the same should happen. But...

Dermot
01-20-2008, 03:54 PM
Put this in the On Link event of the RTF object.
File.OpenURL(e_Link, SW_SHOWNORMAL)

Aleksandar
01-20-2008, 10:25 PM
Put this in the On Link event of the RTF object.
File.OpenURL(e_Link, SW_SHOWNORMAL)

Thanks for Your fast reply.

As I said, I already tried meny combinations, including this.
If there is many links in rich text object, this script open them all at once.

What I need is a comand with wich program will distinguish between them...
Any other suggestion?

Dermot
01-20-2008, 10:38 PM
The code I posted will only open the link that was clciked in the RTF object. The e_Link parameter holds the link that was clicked, so that link is opened. I have tested this many times and it works fine.

Aleksandar
01-20-2008, 10:43 PM
Ouups...

You were completely right.

I alwayst tried to replace "e_link" with exact URL.

This command did exactly what I wonted.

Thank You very much, Dermot