I would like to know the best way to go to the first row that starts with a certain letter when the corresponding letter is pressed on the keyboard.
I have a MSFlexGrid with many rows, in alphabetical order, and I would like to give the user a "short cut" instead of having to scroll down to find a row.
What is the best way to do this in VB 6.0?
Obviusly, the KeyPress event handler would have code that gets the key value and sets the .row property of the grid, but how do I find out which row to go to? I want it to go to the first row that has a value that starts with that letter.
Would I have to loop through the grid values, and examine the first letter of each row until I find a match? That seems like an expensive way to do it. Is there a more direct way?
Also, when the .row property is set will the display automatically scroll down the that row, or do I need to do something else?
Thanks,
John
I have a MSFlexGrid with many rows, in alphabetical order, and I would like to give the user a "short cut" instead of having to scroll down to find a row.
What is the best way to do this in VB 6.0?
Obviusly, the KeyPress event handler would have code that gets the key value and sets the .row property of the grid, but how do I find out which row to go to? I want it to go to the first row that has a value that starts with that letter.
Would I have to loop through the grid values, and examine the first letter of each row until I find a match? That seems like an expensive way to do it. Is there a more direct way?
Also, when the .row property is set will the display automatically scroll down the that row, or do I need to do something else?
Thanks,
John