Page 1 of 1
Can you hilite the Find commands found text?
Posted: Fri Oct 09, 2009 2:46 am
by urbaud
I’m using the Find command to find segments of text within a larger body of text. As you know, when the desired segment is found, the Find command puts a “boxâ€
Posted: Fri Oct 09, 2009 3:20 am
by FourthWorld
See the foundText function.
Posted: Fri Oct 09, 2009 8:13 pm
by urbaud
Hi Richard,
Thanks for the quick reply. I think I am using the “foundtextâ€
Posted: Fri Oct 09, 2009 8:55 pm
by FourthWorld
You can use the foundText chunk description to do anything you want with the chunk; you can select it, or set its backgroundColor, etc.
Posted: Sun Oct 11, 2009 1:42 am
by urbaud
Hi Richard,
Can you direct me to a link that will show me the syntax to change the background color of the foundText chunk , the dictionary doesn't show how to do that. By the way, what is it with the dictionary-many times I look something up and try the examples and they don't work. For example, the dictionary has the line: "the foundText" as part of the example, but if I put it into an onMouseUp handler, it generates an error message. Do you know of a good source for Revolution syntax, if so, what is it. I find the information about Revolution commands, functions, etc sorely lacking. I have Schaffers book and it is somewhat helpful, but I wish there was some other good source. I have looked at the course stuff from BYU-it's pretty good. Any further help you can provide would be much appreciated.
Posted: Sun Oct 11, 2009 3:35 am
by FourthWorld
Dude, ya' gotta experiment. You'll be surprised by how easy these types of things are in Rev, and the more you experiment the quicker you'll get the hang of it.
We know from the dictionary entry for foundChunk that it returns a description that uses a chunk expression, and that we can assign the background color to a portion of a field's text using a chunk expression, so putting the two together gives us:
Code: Select all
on mouseUp
find "something" in fld 1
set the backgroundcolor of the foundChunk to "blue"
end mouseUp
