Recent

Author Topic: TStringGrid EditingDone event not firing  (Read 4444 times)

Чебурашка

  • Hero Member
  • *****
  • Posts: 588
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
TStringGrid EditingDone event not firing
« on: November 06, 2023, 02:17:33 pm »
Hello, again on TStringGrid.

Have the clipboard filled with some text (open a text editor, select text and do CTRL+C*).

There are two ways to paste the clipoard content into a cell:
  • Click on the cell, this activated the editor and do CTLR+V
  • Some how put the focus on the cell and do CTLR+V. I did it by clicking on the header to focus on the grid, and then I moved focus on the target cell.

The difference is that in first case EditingDone event is fired, in second case seems not.

Is is this correct?

(Sorry about all this TStringGrid related noise!)


* Some international users might have different keyboard shortcuts other than CTRL+C and CTRL+V)
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

Bart

  • Hero Member
  • *****
  • Posts: 5575
    • Bart en Mariska's Webstek
Re: TStringGrid EditingDone event not firing
« Reply #1 on: November 06, 2023, 03:27:56 pm »
Please file a bugreport: IMO OnEditingDone should be fired in both cases.

Bart

Чебурашка

  • Hero Member
  • *****
  • Posts: 588
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: TStringGrid EditingDone event not firing
« Reply #2 on: November 06, 2023, 03:45:54 pm »
Please file a bugreport: IMO OnEditingDone should be fired in both cases.

Bart

Done, thank you.
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

jamie

  • Hero Member
  • *****
  • Posts: 6989
Re: TStringGrid EditingDone event not firing
« Reply #3 on: November 07, 2023, 12:01:24 am »
I don't get it?

"EditingDown" means when the cell is in EDITING mode.

Clicking a cell does not put the cell in edit mode unless somehow you forced it, or you double clicked it.

What did I miss ?

The only true wisdom is knowing you know nothing

Bart

  • Hero Member
  • *****
  • Posts: 5575
    • Bart en Mariska's Webstek
Re: TStringGrid EditingDone event not firing
« Reply #4 on: November 07, 2023, 12:49:32 pm »
EditingDone (not EditingDown) signals that the user is done editing.
This is at least supposed to happen when user hits Enter or leaves the control.
It can be argued (and I would support that) that pasting into a selection of celss should also signal that the user is done editing.

Bart

 

TinyPortal © 2005-2018