我有一个带有垂直滚动条的大ToolStripMenuItem表。我想滚动到此表中的特定项目
{
MenuStrip strip = new MenuStrip();
ToolStripMenuItem fileItem = new ToolStripMenuItem("&File");
// Create an array of ToolStripMenuItems
ToolStripMenuItem[] col = new ToolStripMenuItem[20];
// Populate the list with menus named "Menu 1" through "Menu 4"
for (int i = 0; i < 20; i++)
{
col[i] = new ToolStripMenuItem("Menu " + (i + 1));
// Make first item checked
if (i == 0)
{
col[i].Checked = true;
}
}
// Create menu item containing icon and a collection
ToolStripMenuItem collectionMenu = new ToolStripMenuItem("Collection", Image.FromFile("c:\\Arrow.png"), col);
fileItem.DropDownItems.Add(collectionMenu);
collectionMenu.DropDown.AutoSize = false;
collectionMenu.DropDown.Height = 100;
strip.Items.Add(fileItem);
this.Controls.Add(strip);
}
我需要打开下拉列表和menu15可见