Article ID: 193775
Article Last Modified on 8/25/1999
PUBLIC y
y=CREATEOBJECT("form1")
y.Show
RETURN
DEFINE CLASS form1 AS form
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT brokenlabel1 AS brokenlabel WITH ;
Height = 24, ;
Left = 72, ;
Top = 48, ;
Width = 108, ;
Name = "brokenlabel1"
PROCEDURE Init
*Thisform.brokenlabel1.enabled=.F.
ENDPROC
PROCEDURE brokenlabel1.Init
*This.Enabled=.F.
ENDPROC
ENDDEFINE
DEFINE CLASS brokenlabel AS label
Caption = "Label1"
Enabled = .F.
Height = 17
Width = 40
Name = "brokenlabel"
ENDDEFINE
DO test1.prg && this should display the form
? y.brokenlabel1.Enabled && Returns False.
y.brokenlabel1.ForeColor=RGB(0,0,255) && Makes the label text blue
* but it shouldn't since the
* label is disabled.
y.brokenlabel1.Enabled=.F. && Finally disables the label.
RELEASE y && Closes the form.
PUBLIC x
x=CREATEOBJECT("labelform")
x.SHOW
DEFINE CLASS labelform AS form
DoCreate = .T.
Caption = "Form2"
Name = "labelform"
ADD OBJECT label1 AS label WITH ;
Caption = "Label1", ;
Enabled = .F., ;
Height = 17, ;
Left = 48, ;
Top = 60, ;
Width = 72, ;
Name = "Label1"
ENDDEFINE
DO test2.prg && This should display the form.
? x.label1.Enabled && Returns False.
x.label1.ForeColor=RGB(0,0,255) && Makes the label text blue
* but it shouldn't since the label
* is disabled.
x.label1.Enabled=.F. && Finally disables the label.
RELEASE x && Closes the form.
PROCEDURE Init
Thisform.label1.Enabled=.F.
ENDPROC
Additional query words: kbVFp600bug kbVFp500abug kbOOP kbvfp500a kbvfp600
Keywords: kbbug kbnofix kbcode KB193775