Checkbox/field related question

Silver, Jason jsilver at qualcomm.com
Tue Mar 1 15:32:47 EST 2005


Hi Jonathan,

Thanks for your script!  I think I see where you're going with it
(though the second line is still a little confusing; I'm still grasping
when to use "me" and/or "target").  

What I'm doing instead is using graphics for checkboxes.  So, in my if
statement, I'm checking as follows:

  if the imageSource of char 1 of line currentLine of field "List Items"
is "Checkbox Empty"  then
    set the imageSource of char 1 of line currentLine of field "List
Items" to "Checkbox Filled"
  else if the imageSource of char 1 of line currentLine of field "List
Items" is "Checkbox Filled" then
	set the imageSource of char 1 of line currentLine of field "List
Items" to "Checkbox Empty"
  end if

I wasn't able to think of this solution before looking at your script.
Thank you for shedding light; this list always does!

-Jason

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Lynch,
Jonathan
Sent: Tuesday, March 01, 2005 12:05 PM
To: How to use Revolution
Subject: RE: Checkbox/field related question

I am chiming in late on this - so I might be confused...

But if you are looking to have a checkbox in a field that switches back
and forth when checked - I have a field that does this. The following
script goes in the field:

On mouseup
   put word 2 of mousecharchunk() into aaa
    put character aaa of me into B
    if chartonum(B) = 254 then 
      put numtochar(168) into character aaa of me
      set the textfont of character aaa of me to "wingdings"
      set the textsize of character aaa of me to 16
    else if chartonum(B) = 168 then 
      put numtochar(254) into character aaa of me
      set the textfont of character aaa of me to "wingdings"
      set the textsize of character aaa of me to 16
    end if
end mouseup

just make sure the field has the checkbox character in it to start out
with: *

I know - that probably looks like a bullet point - but if you change
it's font to wingdings, it will look like a checkbox.

If this is covering old ground for you, my apologies.

----



_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


More information about the use-livecode mailing list