Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: SQL
Expertise: Beginner
Mar 21, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

I tried fld.SetFocus() but it doesn't work. Any suggestions?

I'm using OPO 1.0.16 on a Mac, and want to confine all input to a field on a form. The user can change some popups on the form, but the cursor should return to the the input filed afterward.

Sure, that's why I'm the OPO Pro. If you want to cause an action whenever the value of the fld field changes, you should add code to the PostChange() method of the object. This method will fire whenever the value is changed, by user intervention or by code. You would then modify the value of the fld field from the PostChange() method of the popups.

It's often a mistake to try and force users to do things in a graphical environment, such as forcing the cursor back to a field. Free navigation in a client/server application is very important to users and overall design philosophy. Besides, the SetFocus() method sometimes doesn't work the way we expect, since SetFocus() cannot always properly operate if the focus is in limbo somewhere, like after leaving another object or, possibly, while OPO is processing a selected value in a popup.

DevX Pro
Comment and Contribute






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



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