on 07-06-2004 12:17 PM
Hi all,
SBO 6.50.097 SP:01 EF:07
Just a small query, is there a way to set focus to a field as soon as a form has loaded?
For example: when the Stock Transfer screen (FormType = 940) loads, it sets the focus to the From Warehouse field (ItemUID = "18"). Is there a way to set the focus to the Customer field (ItemUID = "3") after the form is loaded?
I can use the following code to select an EditText type item object:
'Customer field.
Set oItem = oForm.Items.Item("3")
oItem.Click ct_Regular
but this does not work with et_Form_Load etc.
Any help is much appreciated.
Regards,
Andrew.
You might be able to use the form load event for this.
Simulate a user click "after" the action has taken place.
if pval.eventtype= et_FORM_LOAD
_ and pval.beforeaction = false then
end if
This should give you a sort of "form loaded -event". If SAP generates before and after action in this case.
HTH Lutz Morrien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Thank you for the reply!
The pVal.BeforeAction property you mention only seems to work with a MenuEvent object. For an ItemEvent object the pVal.Before_Action property only specifies if the event was was issued before or after SBO handles the event. If I use the following code:
If pVal.FormType = 940 And pVal.EventType = et_FORM_LOAD Then
If pVal.Before_Action = True Then
SBO_Application.MessageBox "Hello"
End If
End If
nothing happens. Whereas if I use the following code:
If pVal.FormType = 940 And pVal.EventType = et_FORM_LOAD Then
If pVal.Before_Action = False Then
SBO_Application.MessageBox "Hello"
End If
End If
or
If pVal.FormType = 940 And pVal.EventType = et_FORM_LOAD Then
SBO_Application.MessageBox "Hello"
End If
then the messagebox appears before the form loads. So my code is being executed before the form is loaded - I need it to execute after the form loads.
Regards,
Andrew.
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.