Solved

Making an DBEdit field autoexit

Posted on 1997-09-06
2
417 Views
Last Modified: 2010-05-18
Is it possible to make a DBEdit field to automatically exit to the next field (like pressing tab) as soon as it is totally filled? DBASE used to do that automatically.
0
Comment
Question by:avj
2 Comments
 

Accepted Solution

by:
ptiemann earned 50 total points
ID: 1344166
yes, it is possible :-)
You have to write some eventhandler for the OnChange event. The following code exits to the next field when you have reached 12 characters.
You may derive your own component from TDBEdit that does this automatically so you don't have to code it for each control separately.

procedure TForm1.DBEdit1Change(Sender: TObject);
begin
  if length(DBEdit1.Text) = DBEdit1.Field.DataSize then
    PostMessage (Handle, WM_KEYDOWN, VK_TAB, 0);
end;

Note: Use PostMessage instead of SendMessage (which would not work)
0
 
LVL 4

Expert Comment

by:itamar
ID: 1344167
I'm also interested in the other solution therefore I'll repost this question for 25 points.
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
proper way to parse url in delphi 2 202
Delphi cmd execution 6 60
Delphi - replicating a form 8 74
Why  'Host Connection unavailable/Socket Error #113 No route to host' 6 42
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question