制作步骤:
1、添加一个 TImageList: ImageList1, 然后载入些图标;
2、添加两个 TPopupMenu: PopupMenu1、PopupMenu2, 并分别添加些菜单项;
3、添加一个 TToolBar 控件: ToolBar1, 通过其右键菜单 New Button 添加两个按钮: ToolButton1、ToolButton2;
4、选择属性:
ToolBar1.Images := ImageList1;
ToolButton1.Style := tbsDropDown;
ToolButton2.Style := tbsDropDown;
ToolButton1.DropdownMenu := PopupMenu1;
ToolButton2.DropdownMenu := PopupMenu2;
设计时图:
运行时图: