× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




On 20/01/2006, at 9:45 AM, Tim Kredlo wrote:

I have single choice field on a 5250 data entry screen. I change the initial select value programmatically prior to presenting the screen, and the radio
button correctly shows the selection. However, whenever the field 'gets
focus', the cursor moves to the first selection and changes its text to
reverse image. This incorrectly indicates to the user that the first item is
being selected, even though a different radio button shows the correct
selection.

No it doesn't. Reverse-image indicates the cursor position (i.e., the entry that WILL be selected if the space-bar is used to make a selection). Selection is indicated by the selection indicator (in this case a radio button) if one is present or by highlight (not reverse-image) if *NOSLTIND is specified. Educate your users on correct interpretation of the visual feedback.

Question #1: Is there a way to position the cursor at the pre-selected
choice? If so, how?

No. The 5250 data stream does not support a setting to position the cursor to a specific choice within a selection field. The only control you have is over field-to-field movement. You can either use the default (left-to-right and top-to-bottom) or specify the desired movement using the FLDCSRPRG keyword or force positioning to a specific field using DSPATR(PC) or one of the other DDS keywords that control cursor position on output.

I suppose you could use your knowledge of:
        a) the field name
        b) the selected choice
        c) the display type
to determine the row and column on which the selected choice will start and use the CSRLOC keyword to position the cursor to that choice--seems overkill to me. Note that this will only affect the initial display and will not help with controlling cursor movement via the Tab key.

Question #2: Is it possible to have the tab key move the cursor to the next
'choice' selection?  If so, how?

That's not how 5250 GUI interfaces work. Refer to section 2.5.18.1 of the Application Display Programming manual. Tab moves between fields, the arrow keys move between choices within a selection field. A single-choice selection field is a single field regardless of how many choices it may contain thus Tab moves into the field and out of the field. Menu-bar choices and multiple-choice selection fields are treated as separate fields so Tab moves between these choices. Cursor movement in the 5250 GUI is not the same as in WinDOS but it is consistent and accurately described in the Application Display Programming manual.

I know I can do this without using a 'SngChcFld', but I am hoping I am just
missing some attribute or keyword.

Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists

   http://www.flybynight.com.au/
   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.