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

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 afield on a form. The user can change some popups on the form, but thecursor should return to the the input filed afterward.

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.

See also  Does It Make Sense to Splurge on a Laptop?

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist