Consultor Eletrônico



Kbase P112774: Tab fails in wrapped RichText Box ActiveX control in 9.1D09 and higher
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/3/2006
Status: Unverified

FACT(s) (Environment):

Progress 9.1E
OpenEdge 10.x
Windows

SYMPTOM(s):

9.1D09

Using Microsoft RichText Box Control 6.0

Control has been placed inside a Visual Basic wrapper / container

Tab key no longer works

Ctrl-Tab works as expected

Changing the setting of the HonorProKeys property has no effect

Tab key works when using the Microsoft RichText Box Control 6.0 outside of the Visual Basic wrapper / container

CAUSE:

Visual Basic wrapper is not correctly passing events to the control. The events must be handled explicitly.

FIX:

Add code to the KeyDown and KeyPress events of the Microsoft RichText Box Control to handle tabbing.

Private Sub RichTextBox1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyTab Then
RichTextBox1.SelText = vbTab
KeyCode = 0
End If
End Sub
Private Sub RichTextBox1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
RichTextBox1.SelText = vbCrLf
KeyAscii = 0
End If
End Sub