Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Value_Assign Method in EditBox does not fire
Message
From
02/06/2004 15:25:04
 
 
To
02/06/2004 12:53:44
Robert Lee
Swiderski Electronics, Inc.
Carol Stream, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00909307
Message ID:
00909370
Views:
9
Hi, Robert-

>I am using VFP 8.0. Created a editbox class with a Value_Assign method but the Value_Assign method does not fire when I enter a value to my editbox. Any thoughts?

I see it working for both a textbox and an editbox as in the following code sample. What am I doing differently from what you're trying? Does this sample work for you?
Local o As Form
o=Createobject('myForm')
o.Show(1)

Define Class myForm As Form

  Add Object Text1 As myTextBox
  Add Object Edit1 As myEditBox

  Add Object Button1 As CommandButton With ;
    top = 30

  Add Object Button2 As CommandButton With ;
    top = 120

  Procedure Button1.Click
    Thisform.Text1.Value = "Text1"
    Thisform.Refresh
  Endproc

  Procedure Button2.Click
    Thisform.Edit1.Value = "Edit1"
    Thisform.Refresh
  Endproc

Enddefine

Define Class myTextBox As TextBox
  Value = ""
  Procedure Value_Assign
    Lparameters tvValue
    Debugout Program(0) + ": " + Transform(tvValue)
    This.Value = tvValue
  Endproc
Enddefine

Define Class myEditBox As EditBox
  Value = ""
  Top = 50

  Procedure Value_Assign
    Lparameters tvValue
    Debugout Program(0) + ": " + Transform(tvValue)
    This.Value = tvValue
  Endproc

Enddefine
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform