Check Boxes in Text Fields

Jan Schenkel janschenkel at
Tue Jan 27 11:58:05 EST 2009

--- SparkOut <SparkOutYNY at> wrote:
> Jan Schenkel wrote:
> > 
> > You can always build the field's htmlText in one
> go,
> > and set it after you're done.
> > 
> You lost me there Jan, are you telling me you can
> set the imageSource of
> char 1 of line x of a variable and then set the
> htmlText of the field to the
> variable? (That's what I was suggesting I'd like to
> try, but if you could
> set the imageSource of a chunk of a variable then
> you wouldn't need to set
> the htmlText anyway, you could just put the variable
> - including images -
> into the field. Except you can't. Can you?)

There is no way to set the imageSource of a chunk
inside a variable, plain and simple. What I'm
suggesting is that you build the entire htmlText in
your variable, and then set the htmlText of your

Below a simple example that just checks all the
non-hilited checkbox images.

constant kRegularCheckboxId = 600000
constant kHilitedCheckboxId = 600001

on mouseUp
  -- checking all the boxes in field "Foobar"
  put the htmlText of field "Foobar" into tHtmlText
  replace "<img src=" & quote & kRegularCheckboxId &
quote & ">" with "<img src=" & quote &
kHilitedCheckboxId & quote & ">" in tHtmlText
  set the htmlText of field "Foobar" to tHtmlText
end mouseUp


Jan Schenkel.

Quartam Reports & PDF Library for Revolution

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


More information about the Use-livecode mailing list