FIX: TextBox Does Not Scroll to the Caret Position |
Q181945
The information in this article applies to:
- Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0
SYMPTOMS
When changing the TextBox.SelStart to a position that is not visible in the TextBox, the TextBox does not scroll to the caret position.
RESOLUTION
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.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products that are listed at the beginning of this article.
This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.
MORE INFORMATION
Steps to Reproduce Behavior
- Start a new Windows CE Project in Visual Basic 5.0. Form1 is created by default.
- Add a TextBox to Form1.
- Set the MultiLine property of the TextBox to True.
- Place a CommandButton on Form1.
Add the following code to Form1:
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
- Press the F5 key to run the project. Click on the CommandButton and note that the text box does not scroll to the caret.
Additional query words: vbce vbce5 vbce6 wince
Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbOSWinCEsearch kbOSWinCE100 kbGrpDSVB
Issue type : kbbug
Technology : kbVBSearch kbAudDeveloper kbWinCETKVBSearch kbWinCESearch kbWinCETK100VB500
Last Reviewed: March 15, 1999 |