Skip to content

Create a custom popup container editor with the default OK button in the dropdown.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-popup-container-edit-with-default-ok-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms Popup Container Editor - Display the default OK button in the dropdown

This example creates a custom popup container editor that displays the default OK button in the popup window.

WinForms Popup Container Editor - Display the default OK button in the dropdown

class PopupContainerFormOkButton : PopupContainerForm {
    public PopupContainerFormOkButton(PopupContainerEditOKButton ownerEdit) : base(ownerEdit) {}
    protected override void SetupButtons(){
        UpdatePopupButtons();
    }
    internal void UpdatePopupButtons() {
        if (Properties == null) return;
        this.fShowOkButton = Properties.ShowOkButton;
        if (Properties.ShowPopupCloseButton)
            this.fCloseButtonStyle = Properties.ShowOkButton ? BlobCloseButtonStyle.Caption : BlobCloseButtonStyle.Glyph;
        else
            this.fCloseButtonStyle = BlobCloseButtonStyle.None;
        this.AllowSizing = Properties.PopupSizeable;
        if (!AllowSizing && !fShowOkButton && fCloseButtonStyle == BlobCloseButtonStyle.None)
            ViewInfo.ShowSizeBar = false;
    }
    // ...
}

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)