// 下拉按钮的点击事件 private void but_Click(object sender, EventArgs e) { Button but = (Button)sender; int x = ControlsUtils.LocationOnClient(this.拉按钮_pan).X; if (this.button1.Name.Equals(but.Name)) { if (historicalPanel == null || historicalPanel.IsDisposed) { historicalPanel = ControlsUtils.GetHistoricalPanel(拉按钮_but , 拉按钮_pan.Parent.FindForm().Controls , false , history , 拉按钮_but.Width + this.button1.Width, 23); historicalPanel.Location = new Point(x, 拉按钮_pan.Location.Y + 拉按钮_pan.Height + 5); } else { historicalPanel.Dispose(); historicalPanel = null; } } }