🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.pascal.delphi.databases
1 messages
1 total messages Started by Bill Artemik Mon, 04 Oct 1999 00:00
Changing ENTER as TAB in edit controls - Odd behaviors
#38
Author: Bill Artemik
Date: Mon, 04 Oct 1999 00:00
54 lines
2361 bytes
I'm using the new and improved Delphi 5. I have a client that wants a
standard edit window with some dbEdit controls.

Using a TEdit control to filter the table the user wants to use the
ENTER key to move from field to field. 

I have tried the following examples to get this to work:

In the Form's OnKeyDown event (KeyPreview on)

   if (key=vk_Return) then
      if (Shift = []) then
          SelectNext(ActiveControl,True,True)
      else if (Shift = [ssShift]) then
          SelectNext(ActiveControl,False,True);

When I hit enter from the TEdit control I move to the first DbEdit
control just fine but after entering data and hitting ENTER I go NO
WHERE! 

Then I tried:

Procedure TfrmDataEntry.CMDialogKey( Var Msg: TWMKey );
Begin
   If NOT (ActiveControl Is TButton) Then
      If Msg.Charcode = 13 Then
         Msg.Charcode := 9;
   inherited;
End;

With this procedure as part of the form's PRIVATE declaration. NOTHING
from this, either.

Is there something WIERD about DBEdit controls that trashes the enter
key?

Does anyone have any suggestions (other than getting the user to
concede using the TAB key instead, of course...this is NOT an option
on this program...)

Thanks for any help!

Bill



Bill Artemik
Programmer / Analyst
Droste Consultants, Inc.
bill@droste1.com


"There are THREE kinds of people in the world...
      Those that can count and those that can't."
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads