Skip to main content
A newer version of this page is available. .

How to: Display Custom Controls in Popup

The following example creates a PopupContainerControl with a RichTextBox inside, and assigns this control to a PopupContainerEdit editor.

  RichTextBox rtb = new RichTextBox();
  rtb.Dock = DockStyle.Fill;
  PopupContainerControl popupControl = new PopupContainerControl();
  popupControl.Controls.Add(rtb);

  PopupContainerEdit editor = new PopupContainerEdit();
  editor.Properties.PopupControl = popupControl;
  Controls.Add(editor);