In article <1166661020.387402.160540 (AT) n67g2000cwd (DOT) googlegroups.com>,
"JoeT" <trubisz (AT) yahoo (DOT) com> wrote:
Quote:
Newbie question:
Is there any way in a script that I can make a control (e.g. button,
radio, checkbox, etc) read-only? |
The easiest way would be to put a small "invisible" rectangle / circle
over the radio button / checkbox and then have that run a script
something like:
If (DataEntryAllowed = "Yes")
Set Field (DataField, Value)
else
Show Message ("Field is read only")
End If
You'll need a separate "invisible" rectangle for each radio button /
checkbox option. In older versions of FileMaker you'll also need a
separate script for each option, but in newer versions you can make use
of the parameter ability to pass one script a variable depening on
which option is being clicked on.
I don't quite see how a button can be "read only", but I'm guessing you
you mean "ghosted" / "non-functional". In this case you'd need to have
a Container field postioned above the button which is empty when the
button is working and set to a dimmed graphic version of the button
when "non-functional".
There may or may not be a better way in newer versions of FileMaker.
The new ability to name objects may lead to more scriptable abilities
in future versions of FileMaker.
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)