Maybe you should test your formKeydown code to make
sure it's behaving as you expect. Tell it to
showmessage() when you have the DBGrid selected and
see what happens. Maybe it is selecting the next
control which is the inplaceEditor so you will have to
use different code to do what you want when DBGrid is
selected.
Dave
--- Roberto Freitas <[EMAIL PROTECTED]>
wrote:
> When user presses <Enter> key I would like cursor
> jump to the next
> control on the form. To accomplish it I use these
> pieces of code:
>
> procedure TForm1.FormCreate(Sender: TObject);
> begin
> KeyPreview := True;
> end;
>
> procedure TForm1.FormKeyDown(Sender: TObject; var
> Key: Word; Shift:
> TShiftState);
> begin
> if (Key = VK_RETURN) then
> SelectNext((ActiveControl), True, True);
> end;
>
> It works fine, except in DBCtrlGrid or DBGrid.
> Pressing <Enter> key
> when cursor is on Grids does not fires FormKeyDown
> event, the only
> effect is to change the selection between control
> itself and current
> record.
>
> If is't possible, does anyone know how to do it?
>
>
>
>
>
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~->
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/