Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Key Repetition - how do you switch if off?

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
GB
hi All

I have a dbgrid which is set to multi-select. I was using GotoBookmark to get each record but this turned out to be too slow.

Using DBGrid's OnKeyUp,OnColEnter and OnCellClick, I capture the info I need for each record and store it in a TList.

Trouble is, if they use Shift and arrow keys, then if the key repeating starts, events aren't fired and I don't get all the record id's I need. How can I stop the dbgrid doing a key repeat, so that the user has to step for each record, or alternatively, what event can I use to capture every record highlighted using key repeat?

big ta
lou
 
Hi,

try setting in the Object Inspector under Options
dgMultiSelect to False.

BobbaFet Everyone has a right to my opinion.
E-mail me at cwcon@programmer.net
 
hi

I need to keep the multi select, it's just if they wanted to use the shift for speed, then I need to get the id's of every record highlighted, key repeat then only fires 1 or 2 events of the events as the key press is sustained (if you know what I mean).

Is there another way of doing this without using bookmarks? (ie finding out which records in the dbgrid are highlighted?

lou
 
I think I've managed to get round this problem for now by setting the key repeat speed to be very slow by using

SystemParametersInfo(SPI_SETKEYBOARDSPEED,1,0,0);

Not the best way though.

lou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top