Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Pascal
Expertise: Beginner
May 9, 1997

How to make Enter key act like Tab key in TDBCtrlGrid

Question:
How can I override the Enter key to act like the Tab key between components in a TDBCtrlGrid?

Answer:
There's no simple way to do this. Why? Because child controls contained within a TDBCtrlGrid never get focus, which is required in order to trap keystrokes at that level. You see, once the TDBCtrlGrid gets focus, it retains it. Child controls never get active status.

You can get a list of child controls with the GetTabOrderList method of TDBCtrlGrid, then iterate through the list to try to get to the next control. Other than that, there is no simpler way to approach this problem.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date