Jump to content

Script to change font color?


This topic is 6773 days old. Please don't post here. Open a new topic instead.

Recommended Posts

In a layout I have a series of fields with text data. Is there a simple way to do a script in FM that I can click on one of the fields highlighting the entire text then hit a button on the layout attached to a script ( or hit a fkey on computer) that will change the text color in the field I had just highlighted?

Link to comment
Share on other sites

A hurried thought: Somewhere out there there's a FM demo that does something like this with styled text, but it's a "heavy" setup. My question would be what platform you're on. For OS X, there's a great utility, MenuMaster, that assigns keyboard shortcuts, on the fly, to any menu item, including the swatches in the font color submenu. The advantage is, once you set it up, the hot key runs on that machine across all your dbs, no further futzing required. (Also, if you're on a Mac, then AppleScript might be able to capture the text and apply a style.)

If you just want to DISPLAY the info in color on your layout (and you're not attached to changing the style within the original field), then all the posts about conditional formatting would be useful: essentially you overlay multiple calc versions of your text field over the original field on the layout, each calc field with a transparent background, and each calc version responding to some Case function to decide whether to mimic the original field. You could use a button on the layout to set that parameter... This works only if, as you indicate, it's whole fields at once, rather than just partial field contents. And of course calculated mimic fields would have to be separately set up for each field on which you're interested in doing this.

Cheers...

Link to comment
Share on other sites

This topic is 6773 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.