How to select toolStripSplitButton using keyboard shortcut?
Could someone please tell me how to select toolStripSplitButton using keyboard shortcut
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sudhakar ChaudharyPosted Oct 29, 2012, 6:59 AM
{
toolStripSplitButton1.ShowDropDown();
}
PrathapPosted Oct 29, 2012, 7:01 AM
PrathapPosted Oct 29, 2012, 6:46 AM
PrathapPosted Oct 29, 2012, 6:43 AM
Sudhakar ChaudharyPosted Oct 29, 2012, 6:33 AM
on the form keyDown event
private void mdi_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode.ToString() == "B")
{
toolStripButton1_Click(sender, e);//---call the click event of Toolstripbutton1 if require
toolStripButton1.Select();//-------select Toolstripbutton1
}
}
it works on ctrl+B
thanks.