Setting text to link

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: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
pravgcet
Posts: 1
Joined: Thu Feb 02, 2017 7:56 am

Setting text to link

Post by pravgcet » Thu Feb 02, 2017 8:03 am

I have a field "ffield" and a button and I am trying to make content of field "link"

Here is my code

In Button code, I have added this :

on mouseUp
set the textStyle of fld "ffield" to "link"
put url "some web address" into ur
set the linkText of fld "ffield" to ur
end mouseUp

This gives me error : Object: can't set this property

Anyone know why?

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: Setting text to link

Post by Thierry » Thu Feb 02, 2017 8:40 am

pravgcet wrote: I have a field "ffield" and a button and I am trying to make content of field "link"
Hi,

You were almost there!

Try this:

Code: Select all

   set the linkText of char 1 to -1 of fld "ffield" to ur
HTH,

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

Post Reply