Forum > Designer

OnEditingDone Events in TStringGrid

(1/2) > >>

Blaazen:
Hello,
I have TStringGrid on my form, property AutoEdit is set to True, option goEditing is also True and option goAlwaysShowEditor may be True or False, no matter. When a cell of my grid is in editing mode and i leave it (I click on the next cell, for example) the OnEditingDone event is launched three times! Is it bug or some delphi legacy? I think it is not very efficient launch some event three times. OK, I can do a little workaround:

procedure TGrid.OnEditingDone(Sender: TObject);
begin
if grid.modified then
  begin
     grid.modified:=false;
     .....my code...
  end;
end;
(this makes my code run only once)


but does anyone know better way how to avoid it?
Thanks for your ideas.

I forgot to write that it's Lazarus 0.9.26 on Win Vista.

zeljko:
Try wotj patch from here: http://bugs.freepascal.org/view.php?id=18686

Blaazen:
Zeljko, you have great memory!  :) It is post from June 2009  :).

AFAIR I didn't use this method in my grids finally.

Will this patch be in some near SVN ?

If yes then I will test it and maybe I will do some revision on my code.

Edson:
Just for information: Six year later and I still experiment problems with several calls on OnEditingDone and OnGetEditText.

Cyrax:
Please post a follow up in that linked bug report and ask applying the patch to the trunk if it solves the problem.

Navigation

[0] Message Index

[#] Next page

Go to full version