cancel
Showing results for 
Search instead for 
Did you mean: 

add new control

Former Member
0 Kudos

Hi

i add a new tab or folder in an existing form and in this tab we add some control like static text , edit text and combobox i wana be these control is visible only when

we press this new tab or folder

plz help me

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sha,

As I and some others answer in your other question,

have a look at this post where you have code example.

If you don´t understand something, ask about it.

Hope helps,

Ibai Peñ

Answers (1)

Answers (1)

Former Member
0 Kudos

well sha try this out might be it works

Re: Add new tabbed page

Posted: Mar 4, 2005 3:21 AM Reply E-mail this post

Just some code snipets that may help you.

In the form load:

'Define variables

Dim oFolder As SAPbouiCOM.Folder

Dim oNewItem, oNewItem2, oItem As SAPbouiCOM.Item

'Use an existing folder to get values

oItem = oForm.Items.Item("39") '39 is an existing folder

'Create 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 = "Folder 1"

oFolder.GroupWith("39")

The click event:

If pVal.ItemUID = "Folder1"

And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK

And pVal.Before_Action = True Then

'Change Pane level

Dim oForm As SAPbouiCOM.Form

oForm = con.Forms.Item(FormUID)

oForm.PaneLevel = 9

'This PaneLevel is the one asigned to the new folder.

'Be sure it doesn´t already exist.

End If

And finally, when you create the controls that should be in the folder:

Private oNewItem1 As SAPbouiCOM.Item

oNewItem1.FromPane = Pane

oNewItem1.ToPane = Pane

Former Member
0 Kudos

Just the same code in the link I show.

Just the same code I answer in the link I show.