本人新手,公司项目刚刚用到 dev 控件,用到SearchLookUpEdit ,不知道为什么,SearchLookUpEdit 里面有个 find 按钮,我想隐藏或者 手动设置它的大小。请用过的大神们帮忙解答一下,谢谢

解决方案 »

  1.   

    本来就是筛选控件,把他弄成隐藏还有什么意义.
    到是可以设置弹出框的大小.参考下面语句
    searchEdit.Properties.PopupFormSize = new Size(300, 300);
      

  2.   


    现在Properties 没有效果,,searchEdit.PopupFormSize = new Size(300, 300);  这样设置语法没有错,就是没有效果
      

  3.   

    我这样搞定的 private void repositoryItemSearchLookUpEdit4_Popup(object sender, EventArgs e)
            {
                IPopupControl control = sender as IPopupControl;
                PopupBaseForm Form = control.PopupWindow as PopupBaseForm;
                LayoutControlItem btFindLCI = GetFindControlLayoutItem(Form, "btFind");
                btFindLCI.Control.Text = "查询";
                btFindLCI.Visibility = LayoutVisibility.Never;            LayoutControlItem btFindLCIq = GetFindControlLayoutItem(Form, "btClear");
                btFindLCIq.Control.Text = lcClearText.Text;
            }  private LayoutControlItem GetFindControlLayoutItem(PopupBaseForm Form, string strName)
            {
                if (Form != null)
                {
                    foreach (Control FormC in Form.Controls)
                    {
                        if (FormC is SearchEditLookUpPopup)
                        {
                            SearchEditLookUpPopup SearchPopup = FormC as SearchEditLookUpPopup;
                            foreach (Control SearchPopupC in SearchPopup.Controls)
                            {
                                if (SearchPopupC is LayoutControl)
                                {
                                    LayoutControl FormLayout = SearchPopupC as LayoutControl;
                                    Control Button = FormLayout.GetControlByName(strName);
                                    if (Button != null)
                                    {
                                        return FormLayout.GetItemByControl(Button);
                                    }                            }
                            }
                        }
                    }
                }
                return null;
            }