cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Painter and Matrix

Former Member
0 Kudos

In screen painter I am unable to attach the folder with the respective matrix. Please give the complete method to attach the above mentioned.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Manish,

I am not too sure what you want to know, but if you want a matrix to be displayed only on a specific folder you should do the following. I am going to show you the code, but you can do parts of it in screenpainter as well. In screen painter you cannot display it like you would at runtime.

On your matrix you would set the PaneFrom and PaneTo properties. To only set it visible on the first folder:

        Dim oItem As SAPbouiCOM.Item
        Dim oForm As SAPbouiCOM.Form
        oForm = oApplication.Forms.ActiveForm
        oItem = oForm.Items.Item("My_Matrix")
        oItem.FromPane = 1
        oItem.ToPane = 1

To add the folder you'll have to remember to set the ValOn and ValOff properties:

        Dim oFolder As SAPbouiCOM.Folder
        oFolder = oForm.Items.Item("My_Folder").Specific
        oFolder.Caption = "MyFolder"
        oFolder.DataBind.SetBound(True, "", "UDS_1")
        oFolder.ValOff = 0
        oFolder.ValOn = 1

To invoke the folder's click event you have to code it manually:

Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApplication.ItemEvent
        If pVal.FormTypeEx = "My_Form" Then
            If pVal.BeforeAction = True Then
                If pVal.ItemUID = "My_Folder" Then
                    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                        Dim oForm As SAPbouiCOM.Form
                        oForm = oApplication.Forms.ActiveForm
                        oForm.PaneLevel = 1
                    End If
                End If
            End If
        End If
    End Sub

Hope it helps,

Adele