Articles in this section
Category / Section

How to align a popup to a ParentControl in a form

1 min read

 

Make sure to set the ParentControl property. Note that this will make the corresponding control a "popup parent", not the ParentControl (Control.Parent property). Making a control a "popup parent" will not hide the popup when the user clicks on it.

C#

// Let the popup align around the source textBox.

this.popupControlContainer1.ParentControl = this.sourceTextBox;

// Passing Point.Empty will align it automatically around the above ParentControl.

this.popupControlContainer1.ShowPopup(Point.Empty);

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied