on 09-06-2012 8:28 AM
Hi
I'm working on a code that add text user item in a pane of a form
I've no problem to do that
but when I try to do the same with a ComboBox user item it give me an error
with the follow code I add a text user item
oItem = form.Items.Add("tm_U_CSTH", SAPbouiCOM.BoFormItemTypes.it_EDIT);
sVal = oItem.UniqueID;
oItem.Left = 100;
oItem.Width = 70;
oItem.Top = 240;
oItem.Height = 16;
oItem.FromPane = 1;
oItem.ToPane = 1;
oEditText = ((SAPbouiCOM.EditText)(oItem.Specific));
oEditText.String = "";
oEditText.DataBind.SetBound(true, "OCLG", "U_CSTH");
for the combobox item I tried to change the last 3 rows
oCb = ((SAPbouiCOM.ComboBox)(oItem.Specific));
oCb.DataBind.SetBound(true, "OCLG", "U_FLDF");
but it doesn't work
can you help me? thanks
I've found the solution!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You also have to change your code as follows:
oItem = form.Items.Add("tm_U_CSTH", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
Now do what you want to do.
You also set this for adding the ComboBox.
Hope it Helps
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.