FileMaker Pro Advanced 9.0v3
I have a simple filemaker file that I can send anyone who is
interested to demonstrated the problem.
Thanks,
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles
FileMaker 8 Certified Developer
Member, FileMaker Business Alliance
Cheers,
Sean
HiLite < SourceText ; SearchText >
Let ( [
W = Length (SourceText ) ;
X = Length ( SearchText ) ;
Y = Left ( SourceText ; X ) ;
Z = If ( Y = SearchText ; X ; 1 ) ] ;
If ( X > 0 and Y = SearchText ;
TextSize ( TextStyleAdd ( Y ; Bold ) ; 18 ) ;
Left ( SourceText ; 1 )
) &
If ( X > 0 and W > 0 ;
Hilite ( Right ( SourceText ; W - Z ) ; SearchText ) ;
Right ( SourceText ; W - 1 )
)
)
You have a field with your source-text (say it is called Source)
Create a Textfield gSearch set it to global
Create a calculation cHiLite < Text ; HiLite ( Source ; gSearch )
Type the text you want to search into the gSearch field. The result is a
textfield with all the words highlited. Be aware it works for whole words.
Could perhaps also be set to work with a script.
Keep well, Ursus
<se...@codexdata.com> schreef in bericht
news:a1b942e5-b15d-4e10...@s13g2000prd.googlegroups.com...
Thanks for the function. I looked at it and it appears to work to
highlight the text, but I don't think it will solve my problem. I need
the function to "snap" to the selected text. I have these long texts
and the field that displays them is relatively small. When I highlight
a bit of text (via a script) I need the text field to scroll the
highlighted bit into focus. This is the aspect of the script step, Set
Selection that is not working properly (although it does seem to
highlight the text properly). If you know a way to modify your
function to automatically scroll through a text field until the
highlighted portion is visible, that would be great!
Sincerely,
Sean