View Issue Details

IDProjectCategoryView StatusLast Update
0036824Lazarus CCRFPSpreadsheetpublic2020-03-27 01:13
ReporterPrajuab RiabroyAssigned Towp 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
PlatformDarwinOSmacOSOS Version10.15.4
Summary0036824: Input value on some grid cell while press navigate key (ex KeyUp, KeyDown) then value is filled up on destination cell.
DescriptionInput value on some grid cell while press navigate key (ex KeyUp, KeyDown) then value is filled up on destination cell not current cell. Cannot disable navigate key while input.
Steps To ReproduceOpen example project ccr/fpspreadsheet/examples/visual/fpsgrid. Enter the value, example 123 to D6 don't press Enter key yet. Press any navigate key, example Key Right (VK_Right), the value will be filled up on E6. Libreoffice Calc doesn't allow user to navigate key until press Enter/Return.
TagsNo tags attached.
WidgetsetCocoa
Attached Files

Activities

Prajuab Riabroy

2020-03-25 09:08

reporter  

Capture 1.png (338,798 bytes)
Capture 2.png (297,296 bytes)

wp

2020-03-25 12:07

developer   ~0121704

> Libreoffice Calc doesn't allow user to navigate key until press Enter/Return.
This is not true in this generality.

LibreOffice Calc, or Excel
- Type some text, the cursor is at the end, press ARROW RIGHT --> The next cell will become focused
- Move back to this cell. Press F2 (or double-click). Arrow keys never allow to exit the cell, neither left/right, nor up/down.

The WorksheetGrid inherits most of its functionality from its ancestor TCustomGrid. It has the same behavior as TStringGrid (with gdEditing enabled):
- Type some text, the cursor is at the end. Press ARROW-RIGHT --> The next cell will become focused --> Like Calc/Excel
- Click into that cell. Press F2. Unlike Calc/Excel the entire text is highlighted. Click once more to remove the selection and to see the cursor. Move the cursor with the arrow keys. When the cursor has reached the begin or end of the text, the adjacent cell will be focused. Arrow Up/Down always focus the adjacent cell.

Delphi behavior in its StringGrid:
- Type some text, the cursor is at the end. Press ARROW-Right --> The focused cell does not move, the cursor stays at the end --> Different from Calc/Excel/LCL Grid
- The same happens when F2 is pressed. The left/right arrow keys never leave the current cell during editing, even if the cursor is at the begin or end of the text. Up/down arrows, however, do.

So, the problem is more general. Is the behavior of TCustomGrid regarding arrow keys a bug or a feature? I don't know...

Since extra code is required to move the cursor out of the grid cell editor I think it is intentional.

Prajuab Riabroy

2020-03-25 14:38

reporter   ~0121706

This is OK on Windows but Cocoa macOS Catalina is different. The same example when I enter the value on D6 and press Right Key. The value will be filled on D6 not E6 as my attachments. I 'v just ported my application from Windows 10 to macOS and found the problem.

capture 3.png (73,249 bytes)
capture 3.png (73,249 bytes)
cature 4.png (73,061 bytes)
cature 4.png (73,061 bytes)

wp

2020-03-25 15:46

developer   ~0121709

Sorry, I don't understand. You mean you type "123" in cell D6, press ARROW RIGHT, and the text is written to cell E6? But your screenshot capture4 shows it in D6....

Do you see the issue in TStringGrid, too, or only in TsWorksheetgrid?

Prajuab Riabroy

2020-03-25 19:11

reporter   ~0121712

Sorry to make you confused. This issue is on macOS Catalina only but without a problem on Windows. Please see my new attachments. I will test on TStringGrid later.

Capture 5.jpg (205,874 bytes)
Capture 5.jpg (205,874 bytes)
Capture 6.jpg (229,421 bytes)
Capture 6.jpg (229,421 bytes)

wp

2020-03-25 23:19

developer   ~0121714

I activated my VM with macOS (which is painfully slow) and can confirm the issue in principle. There is a difference, though: When I type "123" in cell D6 and press the right arrow, the text appears in both cells D6 and E6.

What is your fpspreadsheet version?

The issue does not occur with TStringGrid.

Prajuab Riabroy

2020-03-26 03:39

reporter   ~0121716

I think I'm using V1.11 r7330. How to check revision of fpspreadsheet on Lazrus IDE?

wp

2020-03-27 01:13

developer   ~0121724

Last edited: 2020-03-27 01:13

View 2 revisions

OK this version is fine, it is only a few revisions behind mine.
In the meantime I noticed that my behavior (input in both cells) occurs only when the programs runs in the IDE under the debugger. When the program runs outside the IDE I get your behavior (input in destination cell only).
Still not clear where this bug comes from...

Issue History

Date Modified Username Field Change
2020-03-25 09:08 Prajuab Riabroy New Issue
2020-03-25 09:08 Prajuab Riabroy File Added: Capture 1.png
2020-03-25 09:08 Prajuab Riabroy File Added: Capture 2.png
2020-03-25 11:18 wp Assigned To => wp
2020-03-25 11:18 wp Status new => assigned
2020-03-25 12:07 wp Note Added: 0121704
2020-03-25 12:08 wp Status assigned => feedback
2020-03-25 14:38 Prajuab Riabroy File Added: capture 3.png
2020-03-25 14:38 Prajuab Riabroy File Added: cature 4.png
2020-03-25 14:38 Prajuab Riabroy Note Added: 0121706
2020-03-25 14:38 Prajuab Riabroy Status feedback => assigned
2020-03-25 15:46 wp Note Added: 0121709
2020-03-25 15:47 wp Status assigned => feedback
2020-03-25 19:11 Prajuab Riabroy File Added: Capture 5.jpg
2020-03-25 19:11 Prajuab Riabroy File Added: Capture 6.jpg
2020-03-25 19:11 Prajuab Riabroy Note Added: 0121712
2020-03-25 19:11 Prajuab Riabroy Status feedback => assigned
2020-03-25 23:19 wp Note Added: 0121714
2020-03-25 23:19 wp Status assigned => confirmed
2020-03-26 03:39 Prajuab Riabroy Note Added: 0121716
2020-03-27 01:13 wp Note Added: 0121724
2020-03-27 01:13 wp Note Edited: 0121724 View Revisions