Windows Develop Bookmark and Share   
 index > Windows Forms General > ListView control and Key Strokes
 

ListView control and Key Strokes

Hello,

If the listview control is populated with items, and user preses for example key "r", the list view control scrolls to the first object in the listview control whose text starts with letter "r", that's the default behaviour. How can I emulate this behaviour, by pressing a button on the form.

Thank you.

zaboboa  Monday, June 18, 2007 12:18 PM
private void button1_Click(object sender, EventArgs e) {
listView1.Focus();
SendKeys.Send("R");
}

nobugz  Monday, June 18, 2007 7:19 PM
private void button1_Click(object sender, EventArgs e) {
listView1.Focus();
SendKeys.Send("R");
}

nobugz  Monday, June 18, 2007 7:19 PM

You can use google to search for other answers

Custom Search

More Threads

• Graphics Performance Problem: onPaint
• create a report and print it?
• Filtering the data in Dataset
• issue with the List view scroll bar
• Tick a checkbox from a handle?
• Menubar items navigaion not happening in proper direction using left, right arrow keys on the keyboard
• Abort Startup, when Error occurs in Me.Startup
• Maximum Zoom
• UnhandledException & ThreadException from Windows Control
• How to avoid truncation effects when converting a double into a string?