Highlighted
Absent Member.
Absent Member.
249 views

[archive] New to Acubench - gui

[Migrated content. Thread originally posted on 19 February 2008]

New to Acubench and GUI programing.

Trying to control cursor position and input fields. I understand about tabbing, but want users to push enter and have the cursor move to the next field.

Found I could auto advance by setting "NO TAB" to true, but that did not allow me control.

I need to test the input field, then either stay in that field or advance.

Is there a variable that controls what field the cursor is?

thanks from the 20 years programing in cobol guy that doesn't have a clue in the gui area.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] New to Acubench - gui

You should reconsider the way you are receiving the data. When we moved to a full GUI from DOS we simply used after procedures where the input field must be validated, if you dont like the entry after validating in the 'after procedure' for the field and want to stay in the field for corrected input, just set the accept-control to 1 and the control-value to the field in question. You will have full control of what is going on - you need not worry about the renter key versus the tab key - we always used the enter key as you obviously did - not really the GUI way these days!!.

I know that not everyone does it our way, but we always use the accept verb with "on exception continue" - and then we test all relevant valid returns from the accept, and if we dont like it or dont know what it is, we just loop back to the accept. We found this a simple and tried and tsted weay to convert some 400 programs from DOS to full GUI.

Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] New to Acubench - gui

Hi,

We also like our old character based users kept happy.
They've been pressing enter for years and continue to do so in gui.
Add this to you're configuration file
"KEYSTROKE Edit=Next Terminate=13 ^M"

I remember when we first start out converting to GUI - nightmare!

As Keith says, do your testing in the after procedure for the field in question.
If you the program isn't happy to continue on, then do either of these 2 statement
This makes the cursor go back to the field which it just came from

           MOVE 0 TO CONTROL-VALUE
           MOVE 1 TO ACCEPT-CONTROL
           EXIT PARAGRAPH


This makes the cursor go to field ID ##

           MOVE 4   TO ACCEPT-CONTROL
           MOVE ## TO CONTROL-ID
           EXIT PARAGRAPH


Other areas of advice I wish I'd known are

Use exception-cmd-clicked and not event-cmd-clicked

If you're using grids for data entry or allowing users to click for drilldown etc then terminate the accept and then do all you're processing in the exception-other routine.

Don't be tempted to use the vscroll option on grids if there might be lots of data - chances are you'll have to go back to them later and change to paged grids!

If you use bitmaps or menus then remember to manually destroy these controls before you exit the program - even if you're allowing AcuBench to create these.

The forum proved to be a highly usefull source of information for me, and I've no doubt you'll benefit too.

Good luck.

Shaun
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.