Tri-state checkboxes

Ken Ray kray at sonsothunder.com
Fri Feb 23 13:37:21 EST 2007


On Fri, 23 Feb 2007 09:22:33 -0800, Mark Powell wrote:

> Thanks to all for your suggestions, but they do not precisely fit what I
> need.
> 
> The image solutions assume one look-and-feel...if the standalone were to
> be run on Vista, for example, the image would have the wrong motif when
> compared to the neighboring conventional checkboxes.  And Stephen's
> solution uses disabled as the third state, which is not what I need.   I
> need an enabled third state.
> 
> I am guessing this is not possible, but any other ideas are greatly
> appreciated.

Well, the closest you can get is to have a single image that shows the 
equivocal state that is put on top of a real checkbox, and is hidden. 
When the user clicks on the checkbox, you check the current state of 
the hilite and if it is true (checked), you show the equivocal image on 
top and allow the mouseup to continue (which will change the checkbox 
to cleared (unchecked), but beneath the equivocal image. Then when the 
user clicks on the image, you have script that simply hides the image.

Then to find out the "state" of the checkbox, you'd just check the 
visible of the image - if it's showing, you're in an equivocal state; 
if not, you take the hilite of the checkbox.

HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list