void mPopup_ValueChanged(object sender, EventArgs e) { mSelectedIndex = mPopup.SelectedIndex; if (ValueChanged != null) { ValueChanged(this, e); } mPopup.Close(); mPopup = null; this.Invalidate(); }
public void Expand() { if (mPopup == null) { mPopup = new PopupScrollList(mItems); mPopup.TopMost = true; Point absolute_location = this.Parent.PointToScreen(this.Location); mPopup.StartPosition = FormStartPosition.Manual; mPopup.ShowInTaskbar = false; mPopup.Top = absolute_location.Y - mPopup.Height + 1; mPopup.Left = absolute_location.X; mPopup.Width = this.Width; mPopup.Show(); mPopup.ValueChanged += mPopup_ValueChanged; } }
void foof() { mPopup.Close(); mPopup = null; this.Invalidate(); }