Picture Get Focus-trigger | Uniface 9 | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

—  Results per page  —








— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters
For a group of consecutive words like 'end of support' use Match phrase

sp_Feed Topic RSS sp_TopicIcon
Picture Get Focus-trigger
11 May 2017
4:18 pm
Avatar
rogerw
Member
Forum Posts: 228
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi,

Uniface 9.7.01.02.

I have a form that is used with a touch-screen. The data-input to the form is read by a code-reader and the focus should remain on the inputfield (small editbox). There is also a button which quits the form. Furthermore there are some Picture-fields and Editboxes (or NoEditBoxes) that are just used for showing data and info-pictures.
To avoid that the Editboxes get focus, I have the following code in the GetFocus-triggers of the Editboxes
$prompt=inputfield

to put focus back on the inputfield.

The same doesn’t work for the pictures, ie. when the users touches a picture, the focus remains there and the inputfield won’t have focus to get the next input from the code-reader. In another form (start-form), I have no button but just the inputfield and then I can solve it with “edit/nowander”.

Any ideas?

Don’t think too much about the touch-screen and code-reader, the same can be simulated with a keyboard and a mouse.
I can’t demand that the user should understand to put the focus back to the inputfield as it looses focus (think of ordinary people using an ATM).

Regards RogerW. 

PS. Hope I haven’t missed something easy in a hurry Confused.

11 May 2017
5:12 pm
Avatar
Knut
Member
Forum Posts: 168
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi Roger,

Are the image / picture fields defined with a NED,NPR setting?

Knut

11 May 2017
5:20 pm
Avatar
diseli
Admin
Forum Posts: 786
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi RogerW,

I’ve tried to replicate the described behavior using just the keyboard and/or the mouse, but so far I did not succeed. Can you also replicate this issue on a machine without a touch-screen? Also, what kind of device are you using (something like Microsoft Surface or a device with Windows Mobile) and which Windows version?

For my test I’ve just added a $prompt statement to the Field Gets Focus Trigger of the Picture field; e.g.

$prompt=inputfield

This seems to work in all cases.

When you test this, is the Field Gets Focus Trigger of the Picture field not fired or is $prompt not working?

Hope this helps.

Regards,
Daniel Iseli
Uniface Technical Support

11 May 2017
5:30 pm
Avatar
Arjen van Vliet
Member
Forum Posts: 156
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

I personally think the edit/nowander in combination with Knut’s suggestion should do the job and the ‘$prompt=’ statements in the various <FGF> triggers should not be necessary.

Quoting the documentation:

/nowander—cursor keys (including next and previous screen) scroll the field contents and cannot be used to leave a field. When the form is used with the GUI driver, the mouse cannot be used to change the location of the cursor and automatic scroll bars are also disabled. Structure editor functions such as ^NEXT_FIELD, ^PREV_FIELD, and so on, work as normal. Only allowed in Execute trigger.

12 May 2017
8:18 am
Avatar
rogerw
Member
Forum Posts: 228
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi,

Knut, I have tried both, ie. empty Syntax and with “NED,NPR”, no change. On the other hand, although the Syntax is set to “NED,NPR”, whatever widget can be set focus to with the mouse. The syntax neither makes a difference in getting the FieldGetFocus to work for the Picture.

Arjen, as I understand it I can’t use “/nowander” as the user should be able to change focus to the quit-button. This quits the form,but before that focus should remain on inputfield. 

Daniel, I just have a normal display, keyboard and mouse. The customers use a normal PC with some kind of big touch-screen. But as I said, don’t concentrate on the device, I myself test it on a windows7 with a normal display and mouse. Putting a debug-statement into the FieldGetsFocus, shows that the trigger isn’t activated at all. Interesting that you get it working. I have to try the same in Uniface 9.6, from which the application is migrated, and by building a new form.

Regards RogerW.

12 May 2017
9:59 am
Avatar
rogerw
Member
Forum Posts: 228
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi,

I added a new (Widget Type) Picture on another form and the FieldGetFocus worked at once.
I compared the Field Properties and noticed that my old picture was set to Characteristics=Control and the new one to “Not in database”. I changed the new picture to “Control” and then it’s FieldGetsFocus didn’t work anymore.

I change my problem picture to “Not in database” and its FieldGetsFocus worked, but for some reason I couldn’t see the picture anymore although the new picture showed well.
Changing it to “Boilerplate” solved both problems!?!

Regards RogerW.

12 May 2017
1:01 pm
Avatar
diseli
Admin
Forum Posts: 786
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

rogerw said
Hi,

I added a new (Widget Type) Picture on another form and the FieldGetFocus worked at once.
I compared the Field Properties and noticed that my old picture was set to Characteristics=Control and the new one to “Not in database”. I changed the new picture to “Control” and then it’s FieldGetsFocus didn’t work anymore.

I change my problem picture to “Not in database” and its FieldGetsFocus worked, but for some reason I couldn’t see the picture anymore although the new picture showed well.
Changing it to “Boilerplate” solved both problems!?!

Regards RogerW.  

Thanks for info, RogerW.

And that sounds about right. A Control field cannot have focus and triggers like Leave Field and Field Gets Focus are not fired. This is intended behavior. You don’t want these triggers (and things like validation) being fired when you press on (e.g.) a Cancel button. In this context focus might be a bit confusing, because from a GUI point of view the “focus” is on the Control field after the user clicked on it, but for Uniface the “focus” (or prompt) is still on the previously active field. I hope this makes sense.

So for your scenario a Boilerplate seems to be the best option.

Regards,
Daniel

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 131

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ulrich-merkel: 1677

Iain Sharp: 596

Theo Neeskens: 333

gianni: 237

rogerw: 228

lalitpct: 195

istiller: 191

-GHAN-: 171

Knut: 168

sochaz: 165

Member Stats:

Guest Posters: 3

Members: 4736

Moderators: 0

Admins: 8

Forum Stats:

Groups: 1

Forums: 62

Topics: 1980

Posts: 8555

Newest Members:

LadyEmode, SeoClism, Anatoliilak, eeomidmi, ujuewokiqov, avisecepuz, uwitoxus, ekiaeso, abiluwigueba, RonnieArror

Administrators: admin: 23, Adrian Gosbell: 268, diseli: 786, Bob Maier: 2, Nico Peereboom: 58, Michael Rabone: 4, richiet: 406, JanCees: 25