Skip to main content

[archive] Multiline Entry Fields Redux

  • April 6, 2006
  • 4 replies
  • 0 views

[Migrated content. Thread originally posted on 05 April 2006]

Is there some setting or non-apparent technigue I'm missing with the multi-line entry field? We're trying to use it for a contiguous text note that can be saved in the array and then used a line at a time with the proper breaks on an order form. The results I'm getting are extremly flakey.

I have a multiline entry field with the following properties set.

FONT - TRADITIONAL
LINES - 10.40
MAX LINES - 8
MAX TEXT - 192
SIZE - 20.1
STYLE - MULTILINE
VALUE MULTIPLE - TRUE
VALUE PICTURE - X(24)

The code generator pruduces this working storage:

01 .
03 SCR-UDEFNOTE-TEXT-Item.
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
03 SCR-UDEFNOTE-TEXT REDEFINES SCR-UDEFNOTE-TEXT-Item PIC
X(24)
OCCURS 8 TIMES.

The entryfield appears to work fine with the word wrap or enter key moving to the next line. The size allows precisley 24 characters and 8 lines.

When I check the array using debugger everything is in the correct place. However, on occassion, after saving the array to a file and bringing it back for redisplay the display is skewed someway. There are missing letters, missing spaces, and sometime addtional spaces. There does not seem to be a pattern and the problem is intermittant.

If you use the enter key to force the line breaks everything works fine and if you set "value multiple" to false it appears to work fine.

However, editing for changes is another story. If you use the delete key on a character or highlight and delete and try to enter a space and new text you can't. You can arrow key to the end of the line and use the desructive backspace and that works, but if you don't key in the same number of characters you removed it frequently does not make the correct adjustment.

4 replies

[Migrated content. Thread originally posted on 05 April 2006]

Is there some setting or non-apparent technigue I'm missing with the multi-line entry field? We're trying to use it for a contiguous text note that can be saved in the array and then used a line at a time with the proper breaks on an order form. The results I'm getting are extremly flakey.

I have a multiline entry field with the following properties set.

FONT - TRADITIONAL
LINES - 10.40
MAX LINES - 8
MAX TEXT - 192
SIZE - 20.1
STYLE - MULTILINE
VALUE MULTIPLE - TRUE
VALUE PICTURE - X(24)

The code generator pruduces this working storage:

01 .
03 SCR-UDEFNOTE-TEXT-Item.
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
03 SCR-UDEFNOTE-TEXT REDEFINES SCR-UDEFNOTE-TEXT-Item PIC
X(24)
OCCURS 8 TIMES.

The entryfield appears to work fine with the word wrap or enter key moving to the next line. The size allows precisley 24 characters and 8 lines.

When I check the array using debugger everything is in the correct place. However, on occassion, after saving the array to a file and bringing it back for redisplay the display is skewed someway. There are missing letters, missing spaces, and sometime addtional spaces. There does not seem to be a pattern and the problem is intermittant.

If you use the enter key to force the line breaks everything works fine and if you set "value multiple" to false it appears to work fine.

However, editing for changes is another story. If you use the delete key on a character or highlight and delete and try to enter a space and new text you can't. You can arrow key to the end of the line and use the desructive backspace and that works, but if you don't key in the same number of characters you removed it frequently does not make the correct adjustment.
Hi we use a memo facility with multi line display as follows.

03 Screen1-Ef-1, Entry-Field,
COL 4.70, LINE 8.10, LINES 7.60 CELLS, SIZE 28.60 CELLS,
3-D, FONT IS Small-Font, HELP-ID 500, ID IS 1, LEFT,
MAX-LINES 5, MAX-TEXT 200, MULTILINE, USE-RETURN,
VALUE MULTIPLE S-BODY,

The code to poputlate it is simply
PERFORM VARYING MOD1 FROM 1 BY 1
UNTIL MOD1 > 05
MOVE CTX-LINE ( MOD1 ) TO S-BODY ( MOD1 )
END-PERFORM.

The file layout is

03 CTX-LINE-TABLE.
05 CTX-LINE-01 PIC X(0040).
05 CTX-LINE-02 PIC X(0040).
05 CTX-LINE-03 PIC X(0040).
05 CTX-LINE-04 PIC X(0040).
05 CTX-LINE-05 PIC X(0040).
03 CTX-LINES REDEFINES CTX-LINE-TABLE.
05 CTX-LINE PIC X(0040) OCCURS 5.

Seems to work ok for us.

Shaun

[Migrated content. Thread originally posted on 05 April 2006]

Is there some setting or non-apparent technigue I'm missing with the multi-line entry field? We're trying to use it for a contiguous text note that can be saved in the array and then used a line at a time with the proper breaks on an order form. The results I'm getting are extremly flakey.

I have a multiline entry field with the following properties set.

FONT - TRADITIONAL
LINES - 10.40
MAX LINES - 8
MAX TEXT - 192
SIZE - 20.1
STYLE - MULTILINE
VALUE MULTIPLE - TRUE
VALUE PICTURE - X(24)

The code generator pruduces this working storage:

01 .
03 SCR-UDEFNOTE-TEXT-Item.
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
03 SCR-UDEFNOTE-TEXT REDEFINES SCR-UDEFNOTE-TEXT-Item PIC
X(24)
OCCURS 8 TIMES.

The entryfield appears to work fine with the word wrap or enter key moving to the next line. The size allows precisley 24 characters and 8 lines.

When I check the array using debugger everything is in the correct place. However, on occassion, after saving the array to a file and bringing it back for redisplay the display is skewed someway. There are missing letters, missing spaces, and sometime addtional spaces. There does not seem to be a pattern and the problem is intermittant.

If you use the enter key to force the line breaks everything works fine and if you set "value multiple" to false it appears to work fine.

However, editing for changes is another story. If you use the delete key on a character or highlight and delete and try to enter a space and new text you can't. You can arrow key to the end of the line and use the desructive backspace and that works, but if you don't key in the same number of characters you removed it frequently does not make the correct adjustment.
I know this is an old post but did you resolve this issue, i want to write a program to keep a notebook but have never been successful with the multiline entry field. If you did resolve this could you send me a sample of code? thanks,

[Migrated content. Thread originally posted on 05 April 2006]

Is there some setting or non-apparent technigue I'm missing with the multi-line entry field? We're trying to use it for a contiguous text note that can be saved in the array and then used a line at a time with the proper breaks on an order form. The results I'm getting are extremly flakey.

I have a multiline entry field with the following properties set.

FONT - TRADITIONAL
LINES - 10.40
MAX LINES - 8
MAX TEXT - 192
SIZE - 20.1
STYLE - MULTILINE
VALUE MULTIPLE - TRUE
VALUE PICTURE - X(24)

The code generator pruduces this working storage:

01 .
03 SCR-UDEFNOTE-TEXT-Item.
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
03 SCR-UDEFNOTE-TEXT REDEFINES SCR-UDEFNOTE-TEXT-Item PIC
X(24)
OCCURS 8 TIMES.

The entryfield appears to work fine with the word wrap or enter key moving to the next line. The size allows precisley 24 characters and 8 lines.

When I check the array using debugger everything is in the correct place. However, on occassion, after saving the array to a file and bringing it back for redisplay the display is skewed someway. There are missing letters, missing spaces, and sometime addtional spaces. There does not seem to be a pattern and the problem is intermittant.

If you use the enter key to force the line breaks everything works fine and if you set "value multiple" to false it appears to work fine.

However, editing for changes is another story. If you use the delete key on a character or highlight and delete and try to enter a space and new text you can't. You can arrow key to the end of the line and use the desructive backspace and that works, but if you don't key in the same number of characters you removed it frequently does not make the correct adjustment.
To be more precise, the entry field allows me to keep in more data, than is saved and redisplayed, even though I use the max-text. Is that due to the font I'm using (small_font)?

[Migrated content. Thread originally posted on 05 April 2006]

Is there some setting or non-apparent technigue I'm missing with the multi-line entry field? We're trying to use it for a contiguous text note that can be saved in the array and then used a line at a time with the proper breaks on an order form. The results I'm getting are extremly flakey.

I have a multiline entry field with the following properties set.

FONT - TRADITIONAL
LINES - 10.40
MAX LINES - 8
MAX TEXT - 192
SIZE - 20.1
STYLE - MULTILINE
VALUE MULTIPLE - TRUE
VALUE PICTURE - X(24)

The code generator pruduces this working storage:

01 .
03 SCR-UDEFNOTE-TEXT-Item.
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
05 PIC X(24)
VALUE IS " ".
03 SCR-UDEFNOTE-TEXT REDEFINES SCR-UDEFNOTE-TEXT-Item PIC
X(24)
OCCURS 8 TIMES.

The entryfield appears to work fine with the word wrap or enter key moving to the next line. The size allows precisley 24 characters and 8 lines.

When I check the array using debugger everything is in the correct place. However, on occassion, after saving the array to a file and bringing it back for redisplay the display is skewed someway. There are missing letters, missing spaces, and sometime addtional spaces. There does not seem to be a pattern and the problem is intermittant.

If you use the enter key to force the line breaks everything works fine and if you set "value multiple" to false it appears to work fine.

However, editing for changes is another story. If you use the delete key on a character or highlight and delete and try to enter a space and new text you can't. You can arrow key to the end of the line and use the desructive backspace and that works, but if you don't key in the same number of characters you removed it frequently does not make the correct adjustment.
Yeah it is.
Use a fixed font and draw the control so that it only only permits x characters wide.
Max text only controls the overall total (which actually works by the way)