Useful to know – to select items in a ListBox with a right mouse click wire up the following code to the MouseDown event: private void LB_MouseDown(object sender, MouseEventArgs e) { // Select item if right click. if (MouseButtons.Right == e.Button) { Point pt = new Point(e.X, e.Y); LB.SelectedIndex = LB.IndexFromPoint(pt); } }
Archive for April 5th, 2006
Right-Click ListBox – Select Item
Posted in Everything, Software Development, tagged Code on April 5, 2006 | 3 Comments »
