2015-07-10 46 views
1

是否可以将用户定义的字段(UDF)移动到某个位置上的主窗体/窗口?如果是的话,有人可以提供一个例子吗?例如,我不知道如何从UDF窗口获取字段或如何获取UDF窗口的引用。将用户定义的字段移动到主窗体

回答

0

我没有找到一个方法来移动一个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 
相关问题