|
-
September 26th, 2011, 03:03 AM
#1
Shortcut key problems
I've got a contextual menu in which elements are added dynamically.
I want to assign shortcut keys to those elements (1 - 9) but I don't know how.
Can anyone help me?
xem = 49; //(ASCII code for 1)
while (drCupoane.Read())
{
ToolStripMenuItem mnu = new ToolStripMenuItem();
mnu.Text = drC[1].ToString();
mnu.ToolTipText = "Cupon";
char c = (char)xem;
mnu.ShortcutKeyDisplayString = c.ToString();
contextMenuStripDatagridView.Items.Add(mnu);
xem = xem+1;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|