ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Any way to tab to next line in a CNTFLD field ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Any way to tab to next line in a CNTFLD field ?

    Hello,

    I have a large character field on my screen (char 2520, 21 lines of 120) that I've put CNTFLD on. However, since all the lines belong to the same field, pressing TAB moves the cursor to the next field. I want it to move to the next line in the field.

    It seems there is no keyword for such a thing. In that case, is there a way to manually manage the tab key? If I could manage the tab key, I could calculate the next position to position the cursor. Yet I can't find anything about manually managing the tab key either.

    I would rather not have to change the format to a subfile format. Any ideas?

    Thanks.

  • #2
    There is a key that will do that called the New Line key, it places the cursor on the first input capable position of the next line down. It's mapped to the left side Ctrl key on my keyboard, although I can't remember if I manually mapped it or if came like that. If you want to use the Tab key, you could map the New Line key to be Shift + Tab or Alt + Tab via the ACS keyboard mapper, that way you can have either behavior by pressing Shift or Alt or not. I don't know of a way to change the behavior of the Tab key within a program or display file.

    Comment


    • #3
      Thanks for the suggestion. I ultimately decided to convert the format to a SFL format. Even if it were possible to tab to next line of the CNTFLD, users would probably want the options afforded by having an SFL, notably inserting, deleting, duplicating, splitting a line. I wrote another pgm not too long ago that sort of copied what the IBM command STRSQL does (with its function keys) and so I ended up adapting that for this program. I'll keep your ideas for next time though.

      Comment

      Working...
      X