Checkboxes in a scrolling field.

Peter Haworth pete at lcsql.com
Fri Aug 31 15:43:23 EDT 2012


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.

Pete
lcSQL Software <http://www.lcsql.com>



On Fri, Aug 31, 2012 at 11:54 AM, Charles Szasz <cszasz at mac.com> wrote:

> I know this has been done before but in previous cases discussion involved
> two or more columns. My situation does not require multiple columns. Does
> anybody have a good idea on how to implement checkboxes in a scrolling
> field? Thanks for your time!
>
> Charles Szasz
> cszasz at mac.com
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list