Solved

How jump to next control in Tab Order?

Posted on 2000-04-13
2
287 Views
Last Modified: 2010-04-04
Hi!

I have an TEdit and a TButton. When I press the button I want the focus to change to the control placed directly after the TEdit in the Tab Order, no matter what kind of control that is. I've tried to send a WM_KEYDOWN message to the TEdit and to the form owning it, but it doesn't work. How can I do it?
0
Comment
Question by:Dippen
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 2713664
Hi
set the tab order fpr your controls via the object inspector then on the buttons
OnKeyPress event do:

 If key=chr(13) //enter key
 then SendMessage(handle,WM_NEXTDLGCTL,0,0);

this will set focus to the next control in the order.
Regards Barry
0
 

Author Comment

by:Dippen
ID: 2714896
Thanks a bunch. Worked just fine!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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