Skip to Content
author's profile photo
Former Member

Folders in Screen Painter

hello,

i wonder how the folders (tabs) in bo work.

when i add a folder it is drawn as an frame but not with tabs that i can give a caption.

what is the logic behind the pane levels?

which level do i have to set for the folder?

which levels do i have to set for the controls. e.g. a button on tab1 and a textbox on tab2?

please help!

thanks.

matthias

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Posted on Dec 20, 2004 at 08:24 AM

    Hi Matthias,

    When You add a folder to SBO, what you add is the tab, not the frame. Sample code:

    Dim oFolder As SAPbouiCOM.Folder
    Dim oNewItem, oItem As SAPbouiCOM.Item
    
    'I use an existing folder to get some values'
    oItem = oForm.Items.Item("39")
    'Create the new folder'
    oNewItem = oForm.Items.Add
                ("Folder1", SAPbouiCOM.BoFormItemTypes.it_FOLDER)
    
    oNewItem.Top = oItem.Top
    oNewItem.Height = oItem.Height
    oNewItem.Width = oItem.Width
    oNewItem.Left = oItem.Left + oItem.Width - 70
    
    oFolder = oNewItem.Specific
    oFolder.Caption = "New Folder"
    oFolder.GroupWith("39") 
    

    Now you must define the pane level asigned to the new folder. In my case I use 9 value.

    You must asign this value to the controls which are going to be placed in this folder,

    in the FromPane and ToPane properties. Code sample:

    Dim oNewItem1 As SAPbouiCOM.Item
    
    oNewItem1 = oForm.Items.Add
                 ("UniqueUID", SAPbouiCOM.BoFormItemTypes.it_STATIC)
    oNewItem1.Left = 25
    oNewItem1.Width = 125
    oNewItem1.Top = 25
    oNewItem1.Height = 14
    oNewItem1.FromPane = 9
    oNewItem1.ToPane = 9
    

    And then finally, you must code the folder´s click event,

    to activate the related controls. Code sample:

    Private Sub con_ItemEvent
       (ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean)
       Handles con.ItemEvent
    If pVal.ItemUID = "Folder1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And pVal.Before_Action = True Then
    
    'This event is executed when the folder is clicked.'
    'The pane level should be changed in order to see the '
    'related controls'
       Dim oForm As SAPbouiCOM.Form
       oForm = con.Forms.Item(FormUID)
       oForm.PaneLevel = 9
    
    End If
    End Sub
    

    So, moreless, the folder control is just like a button that has some related controls.

    Hope helps,

    Ibai Peñ

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Dec 20, 2004 at 10:32 AM

    ok, i have drawn a form in screen painter with 3 folders. every folder has an own pane area, e.g. folder1 = pane 1, folder2 0 pane 2 and so on. then i have created some controls like a textbox with frompane=1 and topane=1 and so on. one control for every folder....

    when i let the form show through my vb programm i only see the controls for the selected panelevel (switched manually in vb) but i dont see ANY folders!!

    whats the problem here?

    i read that for example link button are only shown when they have a datasource assigned. is it similar with the folders???

    thanks for your help!

    matthias

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      > ok, i have drawn a form in screen painter with 3

      > folders. every folder has an own pane area, e.g.

      > folder1 = pane 1, folder2 0 pane 2 and so on. then i

      > have created some controls like a textbox with

      > frompane=1 and topane=1 and so on. one control for

      > every folder....

      >

      > when i let the form show through my vb programm i

      > only see the controls for the selected panelevel

      > (switched manually in vb) but i dont see ANY

      > folders!!

      Pane levels are like transparent slides laying on the form.

      1.) An item should be visible on every slide (pane level)

      FromPane=0, ToPane=0

      2.) An item should be visible on a single slide (pane level)

      FromPane=5, ToPane=5

      3.) An item should be visible on a range of slides (pane levels)

      FromPane=3, ToPane=9

      The Folders (or "Tabs") are just a graphical frontend for the user to change the pane levels.

      I set FromPane and ToPane for every Folder to 0 (NULL). This way, the folders themselves are visible in every pane level.

      Now, i listen to tab-pressed-events and change the pane levels manually (more or less 😉, probably as you already did:

      > (switched manually in vb)

  • author's profile photo
    Former Member
    Posted on Dec 21, 2004 at 09:46 AM

    First of all, i am sure the work with the screen painter will not make you happy.

    For example it is not possible to define "working" folders with the screen painter.

    We are creating forms with the screen painter, but then we are beautyfing them and only work with the xml files.

    Your Problem we solved with the following modifications in the xml file:

    You need a datasource:

    Finally you have to change the pane-levels "manually" like described above.

    At last, we use the "public void saveAsXML( SAPbouiCOM.Form oForm )" method on B1 Forms to receive good examples.

    I hope this will help you.

    Juergen

    Add comment
    10|10000 characters needed characters exceeded