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

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

Recommended Posts

Posted

Hi,

I've tried searching for this, because I know i've seen it, but can't find it again mad.gif

I was sure La Retta made comment about how you could change the colour of the background according to the mode you were in.. I might well be dillusional, but I"m sure i saw it!

I'm absolutely certain it was nothing to do with creating a coloured global container, but it was more like a status(currentmode) or something like that.

Would be good to know if this was possible, and how you do it.

Cheers

Jan

P.S i did search for both the US version - color, and the "english" version "colour" (i'm not doing typos!)

Posted

Ok - I won't ask why... but you could do it with a container background field which was the result of an unstored calc using different colours for each condition, set using the Status (CurrentMode) as you described it. Of course, you wouldn't see the contents of the field while you were in layout mode, so the actual colour of the part background would be the "layout" colour. You might also think about what colour you would use for a background in Preview mode - because you'll most likely end up printing a page full of that colour.

There is a section in my Handy Bits file in the Samples section of this Forume (be about on page 2 or 3 by now and go to the end to get the latest version). Check out the Colour tab for examples of how to set conditional coloured backgraounds or text.

Posted

Hi Jan smile.gif

You might be referring to a post on User-Friendly finds about a month ago. Changing the background when in different Modes is a perfect way to alert users that they're in Find, etc.. And I use container fields with calcs as Russ describes. But I also stole an idea from CobaltSky using a cButtonMask, unstored calc (graphics set to enlarge) container = gContainer (global container, very small piece of color same as background,) attached to a Find Button script. Then I place the mask over the find button and it disappears in Browse! Very, very cool! And I suppose masks can be layout size? wink.gif I think fields would still be accessible in either Browse or Find however, so I'd suggest a container for layouts with fields. I've only used a mask with buttons but it shows the flexibility of it. Others may have other great ideas!

Anyway, just enter the Status(CurrentMode) calc as unstored, number as:

0 for Browse mode,

1 for Find mode,

2 for Preview mode, or

3 if printing is in progress.

If a script using this function runs while the file is in Layout mode, FileMaker Pro switches to Browse mode and returns 0. This is all stuff I've been learning (stealing) from this forum and you just received the full extent of my knowledge smirk.gif I LOVE all Status functions and I can't wait to learn them.

LaRetta

Posted

You have to be a bit careful. There's a bit of a catch when you are in find mode. Field values don't display in find mode. So any calculated fields (container or otherwise) will be empty.

The general idea is to create a global repeating container field gBkgColours. Insert a different coloured fill in each repetition to suit each mode. Then create an unstored calculated container field with the formula:

GetRepetition(gBkgColours,Status(CurrentMode)+1)

Place this container on your layout at the bottom of the stacking order. Now as it is set up it will display the corresponding colour in every mode except find mode for the reason mentioned above. So what you can do is place a coloured fill behind the calc container field. This is the colour that will display in find mode. In all other modes, the container contents wil display.

BTW, set the container field to transparent.

This topic is 7958 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.