Project

General

Profile

Bug #7879

Cursor isn't positioned right when FILL-IN split on multiple lines

Added by Hynek Cihlar 9 months ago. Updated 9 months ago.

Status:
WIP
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

History

#1 Updated by Hynek Cihlar 9 months ago

See the following test case. Run it and fill the fill-in so that the cursor wraps to the next line. Observe the unexpected cursor position on the next line.

The issue was identified in #7863-7.

def var fi1 as char format 'x(256)' view-as fill-in size 160 by 1.
def frame f fi1 with side-labels size 200 by 20.
enable all with frame f.
wait-for close of this-procedure.

#3 Updated by Tomasz Domin 9 months ago

  • Assignee set to Tomasz Domin
  • Status changed from New to WIP

#4 Updated by Tomasz Domin 9 months ago

4gl - screen when fill-in has no characters

┌──────────────────────────────────────────────────────────────────────────────┐
│fi1:                                                                          │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
└←░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░→┘
                                                                                                                                                                                                                                                Enter data or press F4 to end.

4gl - screen when fill-in has one character

┌──────────────────────────────────────────────────────────────────────────────┐
│fi1: 1                                                                        │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
└←░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░→┘
                                                                                                                                                                                                                                                Enter data or press F4 to end.

4gl - screen when fill-in is full

┌──────────────────────────────────────────────────────────────────────────────┐
│44444444444444444444444444444444444444444444444444444444444444444444444444444 │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
└←░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░→┘
                                                                                                                                                                                                                                                Enter data or press F4 to end.

#5 Updated by Tomasz Domin 9 months ago

FWD after entering single character:

┌──────────────────────────────────────────────────────────────────────────────┐
│a                                                                              

                                                                               │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
└                                                                              ┘

Enter data or press F4 to end.

FWD fill-in is full:

┌──────────────────────────────────────────────────────────────────────────────┐
│4444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
                                                                               │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
└                                                                              ┘

Enter data or press F4 to end.

It seems that fill-in is forced to be wrapped ignoring the fact that containing form is scrollable.

#6 Updated by Greg Shah 9 months ago

Is wrapping even a valid ChUI use case?

#7 Updated by Hynek Cihlar 9 months ago

Greg Shah wrote:

Is wrapping even a valid ChUI use case?

I can't tell. But OE allows it.

#8 Updated by Tomasz Domin 9 months ago

There are two issues:
first - there is no label on initial screen, the issue is caused by a ScrollEvent sent when FILL-IN is getting focus.
second - for some reason clipping is removed so instead of being clipped accordingly full contents of the fill-in is drawn on the screen.

#9 Updated by Tomasz Domin 9 months ago

Tomasz Domin wrote:

There are two issues:
first - there is no label on initial screen, the issue is caused by a ScrollEvent sent when FILL-IN is getting focus.

Those initial focusing events seem to be GUI specific, I've disabled them for ChUI

second - for some reason clipping is removed so instead of being clipped accordingly full contents of the fill-in is drawn on the screen.

In case FillIn is refreshed with FillIn.refresh() no clipping information is present (like it is when a full redraw) thus no clipping occurs. Trying to find whats going on there.

Also available in: Atom PDF