Page 1 of 1
[SOLVED] Property Inspector Contents section
Posted: Mon Oct 08, 2012 11:07 pm
by anmldr
Is the content that you can put in this area HTML? If it is not HTML, then how do you add a hyperlink? In some of the scripting conferences, I have seen that some of the text can be hyperlinks.
Linda
Re: Property Inspector Contents section
Posted: Tue Oct 09, 2012 1:02 am
by Mark
Hi Linda,
Select the text in a field and choose Link from the Text menu.
Kind regards,
Mark
Re: Property Inspector Contents section
Posted: Tue Oct 09, 2012 1:10 am
by dunbarx
Hi.
Not sure what you are asking. When setting the textStyle of several words to "link" that "group" of text is treated as a single word upon such things as "the clicktext". So you can then treat this "grouped" text as a hyperlink if you want. Is that what you meant?
The "contents" in the inspector pertains to dataGrids, table fields, etc. What did you have in mind in that regard?
Do I have any of this right?
Craig Newman
Re: Property Inspector Contents section
Posted: Tue Oct 09, 2012 2:52 pm
by anmldr
Mark wrote:Select the text in a field and choose Link from the Text menu.
That is a start. At least it turned blue like a hyperlink and is underlined but I do not see where to enter what to link to...
For instance if there were words "I am a link" that you want to be a hyperlink, you select that text and choose Link from the Text menu. It never gives you a choice for you to enter something like "
http://www.mysite.com". All that it does is to change the text color to blue and underline it.
Linda
Re: Property Inspector Contents section
Posted: Tue Oct 09, 2012 2:59 pm
by Klaus
Hi Linda,
It never gives you a choice for you to enter something like "
http://www.mysite.com".
All that it does is to change the text color to blue and underline it.
Yes, that is correct!
You need to add a script to that field with the link in it and catch the "linkclicked" message.
Like this, which presume that you only have internet links (
http://www....):
Code: Select all
on linkclicked tLink
launch url tLink
end linkclicked
Best
Klaus
Re: Property Inspector Contents section
Posted: Tue Oct 09, 2012 3:04 pm
by Mark
Hi Linda,
There are several ways to do this. You could set the htmlText property of a field to, for example,
Code: Select all
<p>some text <a href="http://somelink.com">this is a link"</a> some text</p>.
You can do this by copying this piece of htmlText and executing the following line from the message box:
Code: Select all
set the htmlText of fld x to the clipboardData["text"]
but there are many more possible ways to set the htmlText property. You just can't do this in the properties inspector.
Another possibility is to execute syntax like this:
Code: Select all
set the linkText of word 3 to 7 of fld x to "http://somelink.com"
Now you can add the following script to your field:
Code: Select all
on linkClicked theLink
launch URL theLink
end linkClicked
If you don't set a link but instead just select some text and choose Link from the menu, you could do this:
Code: Select all
on linkClicked theLink
if theLink is "I am a link" then
lunch URL "http://economy-x-talk.com"
else
beep
end if
end linkClicked
Kind regards,
Mark
[SOLVED] Property Inspector Contents section
Posted: Tue Oct 09, 2012 4:37 pm
by anmldr
Great! Hopefully, I am starting to "get it".
Linda
Re: [SOLVED] Property Inspector Contents section
Posted: Tue Oct 09, 2012 4:45 pm
by Klaus
Go, Linda, Go!
