on 10-28-2009 10:35 AM
hi...
i have written the following code in my item event.....
the purpose of this is...when my form changes to add mode...i want the cursor to be placed in my first control(i.e TextBox)
here my when i place this code in item event....my menu events are not working at all...and my item events are alos not working
is there any other way to focus my control when my form mode changes to any other mode.....
If (pVal.FormUID = "Form502") And (oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE) Then
oForm.Items.Item("7").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
End If
Hello Shenaz,
When you create the form reference, rather than hardcoding the Form UID, make it unique through variables, etc. I believe there's a way to determine how many instances of a form type are open, so you could just add one to that value and append it to the Form UID. Other manual systems could work, as well.
Regards,
Mark Dielmann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shenaz,
Try the following code:
If (pVal.FormTypeEx = "Form502") And (oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE) Then
oForm.Items.Item("7").Click()
End If
If you are opening multiple instances of a form, then you need to trap your event via the FormTypeEx property, not the FormUID.
Regards,
Vítor Vieira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
5 | |
3 | |
3 | |
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.