Article ID: 180615
Article Last Modified on 5/12/2003
DEFINE CLASS NewTextBox AS textbox
PROCEDURE KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
*-- Once the text has changed, set the custom
*-- property of the form to the text box.
ThisForm.custom_prop = This.Value
ENDPROC
ENDDEFINE
frmMain = CREATEOBJECT("frmBase")
frmMain.Show
READ EVENTS
DEFINE CLASS frmBase AS Form
*-- Set the property to a character type.
custom_prop = ""
PROCEDURE Init
ThisForm.custom_prop = .NULL.
ENDPROC
PROCEDURE Unload
CLEAR EVENTS
ENDPROC
*-- Create the text box that gives the problem.
ADD OBJECT text AS NewTextBox WITH ;
Left = 100, ;
Top = 0, ;
Width = 250, ;
Name = "txtText",;
NullDisplay = ".NULL.",;
ControlSource = "thisform.custom_prop"
*-- Create another text box to give you something to tab into.
ADD OBJECT text2 AS TextBox WITH ;
Left = 100, ;
Top = 50, ;
Width = 250, ;
Name = "txtText2"
ENDDEFINE
DEFINE CLASS NewTextBox AS textbox
ENDDEFINEKeywords: kbbug kbprb kbcode KB180615