public class DropDownButton : System.Windows.Forms.Control
{
private System.ComponentModel.Container components = null;
private bool isHover = false;
private bool isPressLeft = false;
private bool isPressRight = false;
public event EventHandler ClickEvent;
public Menu.MenuItemCollection MenuItems { get; set; }
public string Caption { get; set; }
public DropDownButton()
{
InitializeComponent();
this.RefreshButtonsRects();
m_comboMenu = new ContextMenu();
MenuItems = new Menu.MenuItemCollection(m_comboMenu);
this.SizeChanged += new EventHandler(DropDownButton_SizeChanged);
this.MouseUp += new MouseEventHandler(DropDownButton_MouseUp);
}
protected overri
简单的DropDownButton(Winform)
最新推荐文章于 2024-05-17 23:58:43 发布
本文详细介绍了如何在Windows Forms应用程序中使用DropDownButton控件。内容包括DropDownButton的基本用法、事件处理以及自定义项的添加,帮助开发者更好地理解和运用此控件。
摘要由CSDN通过智能技术生成