Skip to Content
0

How to add new buttons in campaign form at a fixed position in B1 SDK?

Jun 02, 2017 at 01:27 PM

83

avatar image

Hi,

I’m currently adding new buttons for the campaign form in Business One with the SDK. There one button I added that is 300 pixels to the left. When I resize the campaign form, the button will move it placement and appear at they right corner of the form. Is there a property I can set to keep the button at a fixed position so the button does not move when I resize the form?

Regards

William

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
ANKIT CHAUHAN
Jun 02, 2017 at 02:41 PM
1

Hi William,

Important is the "Link To" property. Here is the example to use it for Campaign form:

SAPbouiCOM.Form oForm = (SAPbouiCOM.Form)SBO_Application.Forms.GetForm(pVal.FormType.ToString(), pVal.FormTypeCount);
oNewItem = oForm.Items.Add("UserBtn", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
oItem = oForm.Items.Item("1320000002");
oNewItem.Left = oItem.Left + 80;
oNewItem.Top = oItem.Top;
oNewItem.LinkTo = "1320000002";
SAPbouiCOM.Button oBtn = (SAPbouiCOM.Button)oNewItem.Specific;
oBtn.Caption = "My Test";

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Share
10 |10000 characters needed characters left characters exceeded