On Mar 23, 2006, at 5:35 PM, Sven E Olsson wrote:
Our code is nearly similar.
So there is some that not are the same.... and it was I think..
You are not using composite window...
And there it is... Problems, some things need composite window and
some not working ...
But now we know what that problem was.
I'll be darned. I never thought of trying composite. I messed around
with it and finally found that the following will get the scrollbar
to do it's thing the way you want. Just visible=false, and then
visible= true.
Sub Action()
Dim efLine, pos, numChars As Integer
Dim stringToFind As String
stringToFind = efToFind.Text
if stringToFind = "" then
beep
MsgBox "You have not entered any characters to be found"
efToFind.SetFocus
return
end if
pos = InStr(efTest.text, stringToFind)
if pos = 0 then
beep
MsgBox "The string '" + stringToFind + "' was not found within
the editfield contents"
return
end if
numChars = len(stringToFind)
efTest.Visible = false // visible to false
efTest.SelStart = pos - 1
efTest.SelLength = numChars
efLine = efTest.LineNumAtCharPos(pos)
efTest.ScrollPosition = efLine
eftest.Visible = true // visible to true
efTest.SetFocus
End Sub
=== A Mac addict in Tennessee ===
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>