Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8902

Re: Get event on Form - Matrix

$
0
0

Hi Pablo,

I am still not sure whether I understand.

You mean this form, right ?

 

This is gonna be a little tricky. Form_Data_Load won't help you.

There is a lot of UI limitations coming together.

From the top of my head, I would do the following :

Form loaded -> disable Matrix, when batches gert created SBO enables again, so you can check for unload of creation form (65053) or what I prefer disable Matrix again when event GotFocus is fired.

Only problem : when Matrix is in focus ( active ) it cant be disabled -> so I put a "helper" EditText that is out of screen and give focus to that.

 

A little simplified it would look like that in ItemEvent :

 

if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DRAW && !pVal.BeforeAction && pVal.FormTypeEx == "41")
{    SAPbouiCOM.Form oForm = SBO_Application.Forms.Item(pVal.FormUID);    SAPbouiCOM.Item oItem = oForm.Items.Add("Test", SAPbouiCOM.BoFormItemTypes.it_EDIT);    oItem.Left = 2400; // out of visible area   ((SAPbouiCOM.EditText)oForm.Items.Item("Test").Specific).Active  = true;//put focus to this edittext    oForm.Items.Item("3").Enabled = false; //disable Matrix
}
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_GOT_FOCUS && pVal.FormTypeEx == "41" && pVal.ItemUID == "3")
{    SAPbouiCOM.Form oForm = SBO_Application.Forms.Item(pVal.FormUID);    if (oForm.Visible) //after from is loaded    {        ((SAPbouiCOM.EditText)oForm.Items.Item("Test").Specific).Active = true;        oForm.Items.Item("3").Enabled = false;    }
}

 

regards,

Maik


Viewing all articles
Browse latest Browse all 8902

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>