Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hello All. I'm not sure if this is the most appropriate forum for this question, but I've always gotten great support from this site, so here goes:

I would like to include a font or other appearance change as part of a script. I have many text buttons set on a layout to find various groups (using buttons rather than find commands to make the layout simple for novice users of this report).

However, it's impossible for users to tell at the moment which button has been activated, and therefore which subgroup has been found.

I would love to find a way to include a font color change as part of a script, so that I can make the button text indicate the button has been pressed.

Any ideas?

Posted

You will need to use a field overlaid on the button rather than the usual button label.

Then use "Set field" in your script with the TextColor and TextColorRemove calculations. E.g.???

Set field[ ButtonLabel ; TextColor ( ButtonLabel ; RGB ( 255 ; 0 ; 0 ) ) ]

or:

Set field[ ButtonLabel ; TextColorRemove ( ButtonLabel ) ]

Posted

Thanks, Fitch. It's obvious you know a whole more about this than I do.

I'm pretty much a newcomer to FM. I'm trying to follow your suggestions one by one, but I'm not sure what a field overlay is, and the term doesn't appear in the FM help engine, or in my handy FM Missing Manual.

Also, I'm trying to sort through your script command. It looks like I need to replace the text 'ButtonLabel' with the name of the field overlay? Or do I keep the button label? Last confession of ignorance: I'm not sure what a button label is?

To create these button, I just typed some text (e.g., 'SAT < 500'), then selected the text, then chose button setup, then entered the search I wanted that button to perform. My goal now is to change the text attributes when the text button is pushed, so that users will be able to see at a glance which search criteria they have selected.

Thanks again!

Posted

I had assumed (incorrectly it turns out) that you created a button with the button tool, and then typed the text on the button. That text is the button's label. The label can't be formatted dynamically like text in a field. Neither can text you type directly on a layout. So what I meant was to delete whatever text was typed on the button and instead create a field and then put this field on top of the button.

Overlay = to put one thing on top of another thing.

ButtonLabel = just an example of a field name; the name doesn't matter.

Since you're not using the button tool, you can forget the overlay part. Just get rid of your original button, and instead put the calculated field on the layout, and then use button setup to define it as a button, the way you did with your original button.

Note: there are two ways to put a field on a layout: as a standard field, or as a merge field. Either one is fine, but if you use a standard field, be sure to take it out of the tab order so the user can't change the text.

This topic is 6710 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
×
×
  • Create New...

Important Information

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