示例#1
0
 /// <summary>
 /// Opens the control inside a context menu in the specified location
 /// </summary>
 /// <param name="startLocation">Screen coordinates location of the control</param>
 public void Show(Point startLocation)
 {
     // Creates new contextmenu form, adds the control to it, display it.
     _contextForm = new ContextMenuForm();
     _contextForm.SetContainingControl(this);
     _contextForm.Height = PreferredHeight;
     _contextForm.Show(this, startLocation, PreferredWidth);
 }
示例#2
0
        public void Show(Control parent, Point startLocation)
        {
            _parentControl = parent;
            // Creates new contextmenu form, adds the control to it, display it.
            ContextMenuForm frm = new ContextMenuForm();

            frm.SetContainingControl(this);
            frm.Height   = PreferredHeight;
            _contextForm = frm;
            frm.Show(parent, startLocation, PreferredWidth);
        }