FIX: TextBox Does Not Scroll to the Caret PositionID: Q181945
|
When changing the TextBox.SelStart to a position that is not visible in the TextBox, the TextBox does not scroll to the caret position.
The TextBox needs to be sent an EM_SCROLLCARET message after the SelStart is set. Because Windows API calls cannot be made from a Windows CE Toolkit for Visual Basic 5.0 (VBCE) project, the API would need to be wrapped as a method in a Windows CE Toolkit for Visual C++ 5.0 (VCCE) control that could be used in the VBCE project.
Microsoft has confirmed this to be a problem in the Microsoft products listed
at the beginning of this article.
This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.
Private Sub Form_Load()
Text1.Height = 495
End Sub
Private Sub Command1_Click()
Dim x
Text1.Text = "Line 1" & vbCrLf & _
"Line 2" & vbCrLf & _
"Line 3" & vbCrLf & _
"Line 4"
Text1.SetFocus
x = InStr(Text1.Text, "Line 4")
Text1.SelStart = x
End Sub
Additional query words: vbce vbce5 vbce6 wince
Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: March 12, 1999