Setting focus to a widget

Use this board to ask questions or have discussions with other Rich Displays users.
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Setting focus to a widget

Post by mwalter »

I have a small popup panel that contains two input controls. One text box and a drop down. The text box has some javascript in the OnBlur event that basically clicks a hidden button that returns control to the RPG. The RPG will then build the data for the drop down based on the value in the textbox. This is all working fine, however, I cannot seem to get the cursor to stay on the drop down. I tried binding the tab index to two fields in my application and setting them, initially to 1 for the text box and 2 for the drop down. Then when the drop down is filled, I reverse it and set the text box index to 2 and the drop down to 1. I also tried setting focus to the drop down widget after the button click in the OnBlur event in the text box.

Regardless of what I do, the cursor jumps back to the text box.

Any ideas?

Thanks,

Mark.
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Setting focus to a widget

Post by Glenn »

Mark,

I would try binding an RPG variable to the 'set focus' property of the drop down and then turn it on when you are done with the logic that loads the drop down. The next EXFMT should put the focus on the drop down.

Glenn
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Re: Setting focus to a widget

Post by mwalter »

That did it. Thank you.
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Re: Setting focus to a widget

Post by mwalter »

Having this issue again. I have a format with one field and 4 buttons. I've set a variable bound to the set focus property and set the tab index to 1. When the format displays, the cursor is not being placed in the field.
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Setting focus to a widget

Post by Glenn »

The tab index shouldn't have any effect. What sort of 'field' is it? A textbox? If it's the only textbox on the screen it should get focus without you having to do anything.

I just did a simple test on version 5.7 with multiple textboxes and it seems to work as expected for me.

Glenn
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Re: Setting focus to a widget

Post by mwalter »

Yes, a textbox and it's not getting focus. It's the only textbox on the screen.
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Setting focus to a widget

Post by Glenn »

There is a 'no focus' setting on the record format. If that isn't set and there are no other things such as custom JavaScript that might be changing the focus please submit a support request to support@profoundlogic.com.

Glenn
pjshuey
Experienced User
Posts: 119
Joined: Wed May 25, 2016 11:58 am
First Name: Patti
Last Name: Shuey
Company Name: Conestoga Wood Specialties
Phone: 7174452886
Address 1: 645 Reading Road
City: East Earl
State / Province: Pennsylvania
Zip / Postal Code: 17519
Country: United States
Contact:

Re: Setting focus to a widget

Post by pjshuey »

Mark,
I am having this same problem. Let me know what support tells you. Thanks!
Patti
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Setting focus to a widget

Post by Glenn »

Patti,

I believe Mark had the 'no focus' property set. Is this property set on your screen also?

Glenn
pjshuey
Experienced User
Posts: 119
Joined: Wed May 25, 2016 11:58 am
First Name: Patti
Last Name: Shuey
Company Name: Conestoga Wood Specialties
Phone: 7174452886
Address 1: 645 Reading Road
City: East Earl
State / Province: Pennsylvania
Zip / Postal Code: 17519
Country: United States
Contact:

Re: Setting focus to a widget

Post by pjshuey »

No, I did check that. This is something that is so simple, and I just don't see what the issue is...
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests