Article ID: 191324
Article Last Modified on 8/17/1999
CREATE TABLE testtab (f1 c(10))
INSERT INTO testtab VALUE ('abcde')
PUBLIC oform1
oform1=CREATEOBJECT("form1")
oform1.SHOW
RETURN
DEFINE CLASS form1 AS FORM
AUTOCENTER = .T.
CAPTION = "Form1"
NAME = "Form1"
ADD OBJECT pageframe1 AS PAGEFRAME WITH ;
ERASEPAGE = .T., ;
PAGECOUNT = 2, ;
TOP = 20, ;
LEFT = 20, ;
WIDTH = 340, ;
HEIGHT = 215, ;
NAME = "Pageframe1", ;
Page1.CAPTION = "Page1", ;
Page1.NAME = "Page1", ;
Page2.CAPTION = "Page2", ;
Page2.NAME = "Page2"
PROC pageframe1.INIT
THIS.Page1.ADDOBJECT('text1','textbox')
WITH THIS.Page1.text1
.CONTROLSOURCE = "testtab.f1"
.HEIGHT = 23
.LEFT = 107
.TOP = 80
.WIDTH = 100
.NAME = "Text1"
.VISIBLE = .T.
ENDWITH
ENDPROC
ENDDEFINE
form1.pageframe1.page1.text1.InteractiveChange() form1.pageframe1.page1.text1.LostFocus() form1.Paint() form1.pageframe1.page1.Click()If you click the tab of the page, rather than the page, then back on the text box, the textbox.Valid fires and the new value is retained. This also happens if the text box is not located on a page, but on the form itself, if you click on a page.
REPLACE (This.ControlSource) WITH (This.Value)
If the text box uses a property or variable as its ControlSource, store its
Value to the ControlSource in the LostFocus method of the text box. For
example:
STORE this.Value TO (This.ControlSource)
Additional query words: kbVFp600fix kbVFp500abug kbOOP
Keywords: kbbug kbfix KB191324