Checkbox question
Bob Sneidar
bobs at twft.com
Mon Feb 20 12:25:06 EST 2012
Name all your checkboxes with a special 3 character prefix. Have a mouseUp handler in your card or stack script:
ON mouseUp pMouseBtnNo
put the short name of the selectedobject into theObjectName
IF char 1 to 3 of theObjectName is "chk" THEN -- for example
set the hilite of the selectedobject to not the hilite of theSelectedObject
END IF
pass mouseUp
END mouseUp
You can also disable the checkboxes, but they are then a shadow grey color. Unfortunately, changing the foregroundcolor and backgroundcolor of a disabled checkbox does not override this effect the way it does in a field, so no love there.
Bob
On Feb 18, 2012, at 9:42 AM, Pete wrote:
> I have a stack which is used to show information in a display only mode,
> the user is not allowed to change any of the displayed values. I want to
> use checkboxes in some cases. How can I prevent the user clicking the
> check box and changing its state?
>
> I've currently got them disabled to achieve this but I'd prefer them to
> have their enabled appearance, just not allow them to be changed. I've
> considered making images of the checkbox in its checked and unchecked
> state, disabling the checkbox and assigning the appropriate image as its
> disabled icon depending on the checkbox's state but wondering if there's a
> more straightforward way to do this.
>
> Thanks,
>
> --
> Pete
> Molly's Revenge <http://www.mollysrevenge.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