I'm trying to use a StringGrid object for invoice entry, basically the first column is item code the next is description, quantity, price and so on. I would have used a grid of Tedits but I'm trying to pick up more from Lazarus/Delphi so after a bit of looking the StringGrid seemed like it would make things easier, if you have a better suggestion let me know.
Anyway the issue I have is that I have to force the movement in the grid to horizontal only meaning first the item code cell then the quantity shell, price and so on and if the user clicks out of the current line our uses the cursor keys to go up or down then the program has to determine if they are at a point where it is allowed or keep the focus on the current cell. I've done thing like this before with individual tedit 'cells' where the onkeypress checks what key is pressed and decides based on where on the screen the current object is whether or not to allow movement but in the StringGrid I don't see the cursor keys being captured just normal keys. Is this a bug or, and this is more likely, do I have something screwed up? I've tried this with the forms keypreview set to true and false and get the same thing so if it isn't a bug then I'm guessing that I'm missing a setting for the StringGrid object that is not letting the onkeypress event see the cursor keys.
Ideas?