Developer’s Guide
Table Of Contents
- Chapter 1 Getting started
- Chapter 2 Using FileMaker Developer features
- Chapter 3 Using the Developer Utilities
- Overview of preparing your solution files
- Modifying database solution files
- Considerations for a runtime database solution
- Binding databases into runtime database solutions
- Saving and reusing Developer Utilities settings
- Converting and upgrading solution files
- Removing full access privileges from databases
- Chapter 4 Distributing runtime database solutions
- Chapter 5 Customizing database solutions
- Chapter 6 Creating custom layout themes
- Chapter 7 Developing third-party FileMaker plug-ins
- About external functions
- About the example plug-in
- Installing, enabling, and configuring the example plug-in
- Description of the FMExample plug-in’s external functions
- Using the example plug-in
- Customizing the plug-in example
- Requirements for writing external function plug-ins
- FileMaker messages sent to the plug-in
- Avoiding potential Mac OS X resource conflicts
- Providing documentation for your plug-in
- Registering your plug-in
- Appendix A Feature comparison of the runtime application with FileMaker Pro
- Index
42 FileMaker Developer’s Guide
Creating dynamic buttons
By using scripts and calculations to evaluate the state of button
fields, you can make dynamic buttons that change each time they are
clicked.
To create dynamic buttons:
1. Define the dynamic button field.
2. Create the dynamic button script.
3. Connect the field and the script.
The following example shows how to create a button that changes
every time it is clicked.
To define the dynamic button field:
1. Choose File menu > Define > Database > Fields tab.
2. Create a field named Icons and make it a Container type.
3. Click Options > Storage tab.
4. Select the Use global storage checkbox and type the number of
button states for the
Maximum number of repetitions.
5. Click OK.
6. In Browse mode, select the Icons field and choose
Insert menu > Picture to add graphics to the Icons field.
Tip Ensure that all graphics are the same size.
7. Choose File menu > Define > Database > Fields tab.
8. Create a container field named Buttons.
9. Click Options > Auto-Enter tab.
10. For Calculated value, click Specify and enter the function
GetRepetition (Icons; 1)
11. Click OK.
To create the dynamic button script:
1. Choose Scripts menu > ScriptMaker and click New.
2. Name the script Toggle Buttons.
3. Add a Set Field script step.
4. For Specify target field, click Specify.
5. Double-click Buttons.
6. For Calculated result, click Specify.
7. Write a Case function that evaluates each GetRepetition test
expression for the icon number and increments the number by one.
Vertical scroll bar Scroll Window (if the layout is longer than one
screen)
Horizontal scroll bar Scroll Window (if the layout objects are wider
than one screen)
Window size and location Move/Resize Window
To emulate these
interface elements
Create buttons with these
script steps attached
Graphics buttons added to a repeating field
Global repeating field
Repetition number