Checkbox/field related question

Silver, Jason jsilver at qualcomm.com
Tue Mar 1 14:52:18 EST 2005


Thanks Ken and Mark!  I'm not using any HTML text in the fields...just
plain text.  So, I guess that means I'll be using imageSource for my
checkboxFilled.png and checkboxEmpty.png.  I'll just have to watch out
for when the select button is pressed:

on ButtonPress theButton
  switch (theButton)
  case selectKey
    -- checked or unchecked graphic as the first character on the
hilited line?
    -- replace graphic with the other one
    break
end ButtonPress

When using imageSource, how can I get Revolution to return the name of
the control that was used for that particular image?

-Jason

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Mark
Wieder
Sent: Saturday, February 26, 2005 11:51 AM
To: How to use Revolution
Subject: Re: Checkbox/field related question

Jason-

KR> Personally, my suggestion would be to use a list field with two 
KR> separate images, one rectangle with a check mark, and one rectangle 
KR> without. That

That would be my approach, too. Assuming that you're already setting the
image by setting the html content of the line, then all you need to do
is change the imageSource and set the htmlText again.

function Available strWhat
  return "<img src=" & quote & "unchecked.gif" & quote & ">" & strWhat
end Available

function Unavailable strWhat
  return "<img src=" & quote & "checked.gif" & quote & ">" & strWhat end
Unavailable

set the htmlText of line whichLine of field "myField" to \
  Available(the hilitedText of field "myField")

--
-Mark Wieder
 mwieder at ahsoftware.net


_______________________________________________
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