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

Re: Add button to Default Form (UDO)

$
0
0

Hi,

 

I have used this code to add a button on Project Form besides Cancel button on the form.

 

You can use it accordingly:

 

 

SAPbouiCOM.Button oButton;

NewForm = (SAPbouiCOM.Form)SBO_Application.Forms.GetForm(pVal.FormType.ToString(), pVal.FormTypeCount);

SAPbouiCOM.Item oItem = (Item)NewForm.Items.Item("2");

SAPbouiCOM.Item oItem1 = (Item)NewForm.Items.Add("ADDACT", SAPbouiCOM.BoFormItemTypes.it_BUTTON);

oItem1.Top = oItem.Top;

oItem1.Left = oItem.Left + 90;

oItem1.Width = oItem.Width + 10;

oItem1.Height = oItem.Height;

oItem1.Enabled = true;

oButton = (SAPbouiCOM.Button)oItem1.Specific;

oButton.Caption = "Add Activity";

 

 

Make sure that the Item having unique id 2 should exist on the form.

 

 

 

 

Hope it helps.

 

 

Thanks & Regards

 

Ankit Chauhan


Viewing all articles
Browse latest Browse all 9080

Trending Articles



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