This example creates a custom popup container editor that displays the default OK button in the popup window.
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;
}
// ...
}
- MainForm.cs (VB: MainForm.vb)
- PopupContainerEditOKButton.cs (VB: RepositoryItemPopupContainerEditOKButton.vb)
- PopupContainerFormOkButton.cs (VB: PopupContainerFormOkButton.vb)
- RepositoryItemPopupContainerEditOKButton.cs (VB: RepositoryItemPopupContainerEditOKButton.vb)
(you will be redirected to DevExpress.com to submit your response)