Hi,
Its more advisable to do it in the Menu Event rather than the Form_Load event and its got to be done in the Before_Action = False.
In Menu Event,
paste this...
If pVal.BeforeAction = False Then
Dim objNewItem As SAPbouiCOM.Item
objItem = objForm.Items.Item("51")
objNewItem = objForm.Items.Add("cbSQ", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
objNewItem.Left = objItem.Left + objItem.Width + 10
objNewItem.Top = objItem.Top
objNewItem.Width = objItem.Width
objNewItem.Height = objItem.Height
objNewItem.FromPane = "5"
objNewItem.ToPane = "6"
objCheckBox = objForm.Items.Item("cbSQ").Specific
objCheckBox.Caption = "Sales Quotation"
objNewItem.Visible = False
objCheckBox = objForm.Items.Item("cbSQ").Specific
objCheckBox.DataBind.SetBound(True, "", "01")
Endif
The above is a small snippet for the addition of a checkbox.
Hope this helps.
Satish.
Add a comment