Although I don't fully understand why this works, it does...pretty much.

I looped through each line based on the number returned by CountFields, with
EndOfLine as the delimiter.

I then grabbed the length of the current line and added it to charCount.
Then I applied the styling to the StyledText of the EditField
(efFolderDetails) based on this number.

Thanks for the input.


      If CountFields(efFolderDetails.Text, EndOfLine) > 0 then
        endOfLineCount = CountFields(theText, EndOfLine)
        For i = 1 to endOfLineCount
          tempString = NthField(theText, EndOfLine, i)
          charCount = charCount + (Len(tempString) + 1)
          If InStr(tempString, "Copy To Folder:  ") > 0 then
            If InStr(tempString, "(OK)") > 0 then
              efFolderDetails.StyledText.Bold(charCount - (Len(tempString) +
1), 25) = True
              efFolderDetails.StyledText.TextColor(charCount - 5, 4) =
&c00BF00
            ElseIf InStr(tempString, "(MISSING)") > 0 then
              efFolderDetails.StyledText.Bold(charCount - (Len(tempString) +
1), 30) = True
              efFolderDetails.StyledText.TextColor(charCount - 10, 9) =
&cFF0000
            End If
          ElseIf InStr(tempString, "Rename Variable:") > 0 then
            efFolderDetails.StyledText.Bold(charCount - (Len(tempString) +
1), 16) = True
          End If
        Next
      End If


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to