Skip to content

DevExpress-Examples/winforms-lookup-hide-close-button-from-dropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms Lookup - Hide the Close button from the dropdown

This example creates a custom lookup control that does not display the Close button in the dropdown (the fCloseButtonStyle field is set to BlobCloseButtonStyle.None). The example overrides the LookUpEdit.CreatePopupForm method to return a custom edit form:

public class UserLookUpEdit : LookUpEdit {
  // ...
  protected override DevExpress.XtraEditors.Popup.PopupBaseForm CreatePopupForm() {
      return new UserPopupLookUpEditForm(this);
  }
}

public class UserPopupLookUpEditForm : PopupLookUpEditForm {

    public UserPopupLookUpEditForm(LookUpEdit owner)
        : base(owner) {
        fCloseButtonStyle = BlobCloseButtonStyle.None;
    }
}

Files to Review

Documentation