将用户定义的字段移动到主窗体

Move user defined field to the main form

是否可以将用户定义的字段 (UDF) 移动到主 form/window 的某个位置?如果是,有人可以举个例子吗?例如,我不知道如何从 UDF window 获取字段或如何获取 UDF window.

的引用

我没有找到移动 UDF 字段的方法,但我找到了克隆它的方法:

Form myForm = ...;//get Form

myForm.Freeze(true);//freeze form for the flickering problem

Item itemTmp = myForm.Items.Add("NewItemId", BoFormItemTypes.it_COMBO_BOX);

ComboBox comboItem = itemTmp.Specific;
comboItem.ExpandType = BoExpandType.et_DescriptionOnly;
itemTmp.DisplayDesc = true;//display the description of the selected value
comboItem.DataBind.SetBound(true, "OITM", "U_HGR_id");//OITM is the DB table for Items/Articles. U_HGR_id is the UDF field (also column name) that I want to clone to the main window

loadUdfValuesInCombo(comboItem);//a local function that loads the values in the newly created combobox

myForm.Freeze(false);//unfreeze form