BUG: Referencing Value Property In InteractiveChange of EditboxID: Q217059
|
When typing new text within the existing text of an edit box control, the insertion point of the new letters jumps around when you type them in from the keyboard.
This behavior occurs when you reference the Value property of an edit box within the InteractiveChange event of the edit box and the text in the edit box contains carriage return/line feed characters.
Use the Text property instead of the Value property when referring to the contents of the edit box in the InteractiveChange event.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
******************************************
*-- Form: form1
*-- ParentClass: form
*-- BaseClass: form
*
DEFINE CLASS form1 AS form
Top = 0
Left = 0
DoCreate = .T.
Caption = "Form1"
Name = "FORM1"
ADD OBJECT edit1 AS editbox WITH ;
Height = 169, ;
Left = 120, ;
Top = 24, ;
Width = 145, ;
Name = "Edit1"
PROCEDURE edit1.InteractiveChange
*x=This.Text
x=This.Value
ENDPROC
ENDDEFINE
*
*-- EndDefine: form1
**************************************
Hello enter
Line 2 enter
Line 3 enter
Line 4 enter
enter
enter
Line 7 enter
Line 8 enter
Additional query words: kbDSE kbcode
Keywords : kbContainer kbCtrl kbOOP kbVBp500bug kbVFp600bug
Version : WINDOWS:5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: March 12, 1999