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

Question:
I’m using OPO 1.0.16 on a Mac, and want to confine all input to afield on a form. The user can change some popups on the form, but thecursor should return to the the input filed afterward.

Answer:
Sure, that’s why I’m the OPO Pro. If you want to cause an actionwhenever the value of the fld field changes, you should add code tothe PostChange() method of the object. This method will firewhenever the value is changed, by user intervention or by code. Youwould 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 agraphical environment, such as forcing the cursor back to a field.Free navigation in a client/server application is very important tousers and overall design philosophy. Besides, the SetFocus() methodsometimes doesn’t work the way we expect, since SetFocus() cannotalways properly operate if the focus is in limbo somewhere, likeafter leaving another object or, possibly, while OPO is processing aselected value in a popup.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: