K1200 Posted January 20, 2009 Share Posted January 20, 2009 Can anyone offer a suggestion for a good approach to highlight URLs within text fields? FMP has provided the right-click "Open: http: //........" for years. However, it's often hard to spot a short URL (like http:// www .m-w.com) in a large text block. I'd like to have any URL highlighted in a different text color or maybe underlined like a link. I've considered occasionally running a script to parse all text fields in my application and insert color settings. Or (in FMP 10) have a script that executes upon exiting each field, to modify them one at a time. Hopefully, someone has considered this before and can offer some insight. Thanks for any help. Link to comment Share on other sites More sharing options...
Lee Smith Posted January 21, 2009 Share Posted January 21, 2009 Is the text field a concatenation of several fields? i.e. Name, address, web site, notes, etc., or is this a large text field where the information is already part of the text in the field? Lee Link to comment Share on other sites More sharing options...
Ocean West Posted January 21, 2009 Share Posted January 21, 2009 an option would also be to use a web viewer to display the text block then the url's would appear as links making them clickable... http://www.filemakermagazine.com/videos/zero-to-awesome-using-data-objects.html http://sixfriedrice.com/wp/filemaker-9-tip9-web-viewers-without-the-web/ Link to comment Share on other sites More sharing options...
K1200 Posted January 21, 2009 Author Share Posted January 21, 2009 Lee -- It's a large text field. And I forgot to mention that it might contain more than one URL. Ocean -- An interesting idea. Unfortunately, the layouts involved are somewhat set in stone so web viewer can't be used in my specific instance. Link to comment Share on other sites More sharing options...
comment Posted January 21, 2009 Share Posted January 21, 2009 It should be quite easy to "highlight" the http:/ prefix, by substituting it with a styled version of the same. To do this for the entire URL would require a custom recursive function (or a script) - which could get rather complex, esp. since a URL can be followed by a variety of punctuation characters. Link to comment Share on other sites More sharing options...
K1200 Posted January 22, 2009 Author Share Posted January 22, 2009 Thanks for the suggestion. I'll probably just go for the highlight of the prefix. Oddly, though, FileMaker has an internal calculation that can exactly isolate a URL within text. It never seems to miss displaying the "Open://www......." upon a right click within the field. Too bad it can't be accessed. Link to comment Share on other sites More sharing options...
comment Posted January 22, 2009 Share Posted January 22, 2009 I suspect this is a service provided by the OS and not something that Filemaker does on its own. At least on a Mac, you get the same option in just about any application that allows you to edit text. In any case, Filemaker programmers have access to regular expressions - unlike Filemaker developers. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5573 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now