Checkboxes in a scrolling field.
Devin Asay
devin_asay at byu.edu
Fri Aug 31 16:14:26 EDT 2012
On Aug 31, 2012, at 1:43 PM, Peter Haworth wrote:
> I've been thinking about doing this myself but haven't implemented it yet.
> Here's what I had planned to do, there are probably better ways.
>
> 1) Get yourself two images, one of the unchecked check box, one of the
> checked version, call 'em "Unchecked" and "Checked".
> 2) When you're putting data into your field, set the imagesource of char x
> of line y of field "your field" to the ID of Image "Unchecked" (or
> "Checked" depedning on your requirements)
> 3) Use the following mousedown handler:
>
> on mousedown
> switch word 2 of the clickcharchunk
> case the ID of Image "Unchecked"
> set the imagesource of char x of line (the clickline) of field
> "your field" to the ID of image "Checked"
> < do whatever else is needed when the box is checked>
> break
> case the ID of image "Checked"
> set the imagesource of char x of line (the clickline) of field
> "your field" to the ID of image "Unhecked"
> < do whatever else is needed when the box is unchecked>
> break
> end switch
> end mousedown
>
> All totally untested but I think would work in principle.
I've done this before, and it works great.
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list