Thanks, Corey

I've handled that problem now.

The current problem (for anyone reading) is:

If your app is exhibiting a certain behaviour, and there are no obvious events driving 
this behaviour, is there a way of finding out which code in the app IS causing the 
said behaviour. 
eg  I have a StringGrid with NO KeyDown event coded for that particular grid, yet 
when I press say, PageDown when the grid has focus, then the cursor is moved to 
the last line of the grid.  But I'm blowed if I can find the code that is doing that.  
I 
can't find any reference that the behaviour is built in to TStringGrid.

In exasperation

Mark



On 6 Apr 2004 at 15:16, Corey Murtagh wrote:

> Mark Howard wrote:
> 
> >To answer my own question
> >The Grid doesn't have focus, so it is not {MyStringGrid}KeyDown that
> >should be captured, but that of another control.
> >  
> >
> I've run across various issues of this nature, and the solution I've
> found works best in many situations (although your milage may vary) is
> to use Actions with shortcut keys assigned, then enabling or disabling
> the action dependant on when it's valid - in the grid, for example. 
> Actions get first dibs on keypresses, including some 'special' keys,
> so they can be very useful.
> 
> -- 
> Corey Murtagh
> --
> Message scanned by the Sheriff
> 
> 
> _______________________________________________
> Delphi mailing list
> [EMAIL PROTECTED]
> http://ns3.123.co.nz/mailman/listinfo/delphi
> 


_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to