Make Hyperlinks active

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 299
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Make Hyperlinks active

Post by jameshale » Tue Apr 12, 2016 3:24 am

ok So i filled a DG with the following:

Code: Select all

 put "LC" into dga[1]["label"]
   put "http://www.livecode.com is where the action is" into dga[1]["tlink"]
   put "Apple" into dga[2]["label"]
   put "http://www.apple.com it just works" into dga[2]["tlink"]
   put "google" into dga[3]["label"]
   put "http://www.google.com where its at" into dga[3]["tlink"]
   put "MU" into dga[4]["label"]
   put "http://www.macupdate.com they wish" into dga[4]["tlink"]
   put "MR" into dga[5]["label"]
   put "http://www.macrumors.com or chinese whispers" into dga[5]["tlink"]
   put "git" into dga[6]["label"]
   put "http://www.github.com the centre" into dga[6]["tlink"]
   put "pcre" into dga[7]["label"]
   put "http://www.pcre.org [!@#$%^]?" into dga[7]["tlink"]
the DG was a form type with two fields "label" and "tlink" sitting next to one another.

The on FillInData had the following:

Code: Select all

  set the text of field "Label" of me to pDataArray["label"]
   set the text of field "tlink" of me to pDataArray["tlink"]
   set the linktext of word 1 of line 1 of field "tlink" of me to word 1 of pDataArray["tlink"]
and an "On mousedown" handler had ...

Code: Select all

 put the linktext of line 1 of field "tlink" of me into plink
   launch URL plink
   pass mousedown
Observations:
1. The linked text doesn't actually show itself as being a link - perhaps there is a style setting I am missing?
2. Clicking on the ROW opens my browser at the clicked address.

Apart from the lack of a visible underline of the link, is this the behaviour you are seeking?

bbhank
Posts: 116
Joined: Thu Mar 17, 2016 6:04 pm

Re: Make Hyperlinks active

Post by bbhank » Tue Apr 12, 2016 3:28 am

I have the underline.
This is what I want it to do.

Thank you.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”