Welcome, Guest  :: Login 

EntrySet.Lists Namespace

PopupControl Component

PopupControl is a component designed to show any control as a popup window.

Popup window has a header at the top which can be turned on and off with the ShowHeader property. The  ShowStatus property shows and hides the status bar at the bottom. The text is accessible through HeaderText and StatusText properties. By setting the AllowListResize property to true you can allow the user to resize the popup window.

The usage of a PopupControl is very straightforward - you just create new class derived from the PopupControl, override the OnPopupShowing method and provide your control there. Then just call the ShowUp method of your class. You can of course create additional properties and metods to change your control appearance etc.

The following code example shows how to open the PopupControl:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
                          Handles Button1.Click
  PopupControl1.ShowUp(Windows.Forms.Cursor.Position, ContainerPanel1, False)
End Sub

After the popup is shown it will be closed with the click somewhere outside the window. If you need to close it with a click somewhere on your control, you just implement the simple IDropDownControl interface. Then raise the DropDownSelectionChanged event when the window is to be closed.