Hi list,

I have a slight problem when it comes to highlighting multiple words.

The words needed to be highlightd are retrieved from a database 
and comes in one string ie. ' put,the words,here'. I then set this as 
a global, then to be extected into seperate items to be highlighted. 
It seems a long way round the problem but works for single words!

 gSearchWord =  string('put,the words,here)comes in from v12)        

itemCounter = gSearchWord.item.count
repeat with x = 1 to itemCounter   
 set the text of field "SearchWord" & x = gSearchWord.item[x]      
 TheText = member("Info").text
--put each item into seperate fields
  repeat with i = 1 to the number of words in TheText
   if word i of member("Info").text contains string(the text of 
field("SearchWord" & x)) then
    member("Info").word[i].foreColor = 14                         
     member("Info").word[i].fontstyle = [#BOLD
    end if
   end repeat 
end repeat

When the words are highlighted the user can click them and launch a 
glossary MIAW giving more detail of what it means - thats it!
Even though Director sees 'the words' it won't recognise this in the 
final text member to be highlighted. Is this something to do with the 
space between words?
I will be grateful if anyone could shine any light on this or 
re-direct me if there is a simple way to achieve what i want.

Thanks in advance
Paul

Past Forward Limited, England, UK
mailto:[EMAIL PROTECTED]
http://www.pastforward.co.uk/

CONFIDENTIALITY AND DISCLAIMER NOTICE
This email and any attachments are private and confidential.  It is intended for the
recipient only.  If you are not the intended recipient, any use, disclosure, 
distribution,
printing or copying of this email is unauthorised.  You must not read, use or take any
action in reliance on it.  If you have received this email in error please notify the 
sender
immediately by replying to this email and permanently delete the email from your 
computer.

The contents of any attachments to this e-mail may contain software viruses which 
could 
damage your own computer system.  While we have taken every reasonable precaution to 
minimise this risk, we cannot accept liability for any damage which you sustain as a 
result of software viruses.  You should carry out your own virus checks before opening
any attachments.

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to