on 05-18-2006 7:05 AM
Hi, there!
I have two <i>EditText</i> objects on a custom UDO form, the
first one is for <i>CardCode</i> value, the second - <i>
CardName</i>. I'm trying to actualize <i>CardName</i>
value when the <i>CardCode</i> changes, i.e. when <i>
CardCode.et_Validate</i> event occurs (am i wrong?),
but when in an event handler sub I put something in the<i>CardName</i> the <i>
CardCode.et_Validate</i> throws again 'cause the <i>CardCode
</i> field losts its focus I think and it is a problem:
event handler starts again and again... any suggestions
are welcome.
If (pVal.EventType = BoEventTypes.et_VALIDATE) Then
If (pVal.FormTypeEx = "myForm") and (pVal.BeforeAction = False) Then
If (pVal.ItemUID = "eCardCode") Then
oItem = oForm.Items.Item("eCardName")
oEdit = oItem.Specific
'next line causes new et_Validate for eCardCode
oEdit.String = "whatever"
BubbleEvent = False
End If
End If
End If
Thanx
Sergey
Hi Sergey,
The second time the validate event is fired, is within another event so if you check for the innerEvent it should work.
like this:
If (pVal.EventType = BoEventTypes.et_VALIDATE) Then
If (pVal.FormTypeEx = "myForm") and (pVal.BeforeAction = False) and (not pval.InnerEvent) Then
If (pVal.ItemUID = "eCardCode") Then
oItem = oForm.Items.Item("eCardName")
oEdit = oItem.Specific
'next line causes new et_Validate for eCardCode
oEdit.String = "whatever"
BubbleEvent = False
End If
End If
End If
Regard
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.