Linked text in a field as a form
Bill Vlahos
bvlahos at mac.com
Sat Nov 11 17:37:46 EST 2006
The traditional way to deal with an on screen form is to have a number
of label fields and data fields. This works for simple forms but can
get tedious quickly if you have much data to enter. It should be
possible to have a field with the prompt text and a grouped data text.
I would want the starting data text to simply be a number of characters
that are underlined. Lock the field so the user can't modify the
descriptive text but allow the user to enter the fields by clicking on
the linked text which would start out by being just a bunch of spaces
indicating a blank form.
What I want to do is have the user click on the spaces (they are
underlined because the have the link textStyle) and then have a "ask"
dialog box come up for the user to type what they want. Once they are
done changing the entry, the dialog box goes away and the text entered
replaces the original grouped text (but keeps the grouping for later
changes).
The following handler in the locked field will give me the grouped text
itself:
on linkClicked theText
put theText
end linkClicked
...but it won't tell me
1. Which group it was in the field (can I identify multiple linked
texts in a field)?
2. How do I replace the original text group? (I.e. put varText into
group 2 of field "form")
3. How do I keep the replaced text also as a group?
Bill Vlahos
More information about the use-livecode
mailing list