Development Guide
Table Of Contents
- Chapter 1 Getting started
- Chapter 2 Customizing database solutions
- Chapter 3 Customizing menus
- Chapter 4 Creating custom layout themes
- Chapter 5 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
- Chapter 6 Debugging, analyzing, and optimizing files
- Chapter 7 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 8 Distributing runtime database solutions
- Appendix A Feature comparison of the runtime application with FileMaker Pro
- Index
Chapter 2
|
Customizing database solutions 19
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.
8. Click OK.
To connect the field and the script:
1. Choose View menu > Layout Mode.
2. Select the Buttons field and choose Format menu > Field/Control >
Behavior.
3. Clear both Allow field to be entered checkboxes and click OK.
4. Choose Format menu > Button Setup.
5. Select Perform Script and specify Toggle Buttons.
6. Click OK.
You can switch to Browse mode and test your dynamic button. For
more information about using buttons with scripts, see Help.
Graphics buttons added to a repeating field
Global repeating field
Repetition number
Case function for dynamic buttons