 |
s |
I hope you enjoy this FREE online training. Let me know if you'd like to see more! You can email me
at jmo@filemakerpros.com. And, if you really like this online training, consider one of
my live classes based on my wildly popular book and CD ROM.
Happy FileMaking!
|
Changing Button Graphics
You just learned how to show and hide buttons. But, what if you want to change the function and
appearance of a button depending on an event? For instance, maybe you want a button that changes
from Print Quote to Print Invoice depending on the choice made in another field.
Start by defining a global repeating container field with two repetitions.
This field will hold the graphic representations of your buttons.
You won't show this field on any layout, but it is shown in the screen shot above to
solidify the idea. Your next step is to create a calculation with the formula:
GetRepetition(Global, Case(Type = "Quote", 1, 2)).
This formula will control what button shows depending on the value found in the Type field.
Make sure to set the Graphic Format for the Button calculation field to crop rather than enlarge.
The Graphic menu item is found under the Format menu while in layout mode.
Also, set the Button calculation to not allow entry via the Field Format item under the Format menu.
Otherwise, users can click into it and there is no need for that.
When you define the script for the button, it will also need to determine what to do based on the
value found in the Type field.
If you combine this technique with the technique for showing and hiding buttons, you can make a
button appear only if a choice is made from the Type field. Then, depending on the choice,
a different button will appear.
Download an example FileMaker file
.
DONE
|
|
 |
s |
Database Pros offers training classes across the globe. Classes
include the wildly popular Intermediate and Advanced Scriptology training series.
|
|