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: SQL
Expertise: Beginner
Jul 23, 1997

Focus

Question:
When dismissing a dialog, how can I set the focus on the calling form? Is clicking the calling form the only way?

Answer:
There is a weird bug in Power Objects that I also ran across when creating examples for my book, Mastering Oracle Power Objects. I wrote code to bring up a dialog box whenever users entered a particular data field, and I wanted to return them to the next data field when they closed the dialog. I couldn't get this to work, no matter what I tried.

A very helpful gentleman on the OPO team gave me a great workaround. If I used the SetFocus() method before I left the the original field, the focus would return to the specified field. This works well in my situation, and may in yours. It seems the focus sometimes gets 'lost' when you go to a dialog.

I hope this technique works for you.

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