Recent

Author Topic: TValueListEditor - Last Row now deleted if Focused  (Read 1932 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1296
TValueListEditor - Last Row now deleted if Focused
« on: August 30, 2018, 11:22:28 am »

I reported problem with TValueListEditor sorting problem when any cell of it was focused.

And I found that the last row is not deleted fully when the deletion is carried out with the last row focused.
Following code works correctly, when I move away the focus from TValueListEditor.

Code: Pascal  [Select][+][-]
  1.  
  2. var
  3.    vlEditor: TValueListEditor;
  4.    edCodeLabel: TEdit;
  5.  
  6. begin
  7.  if vlEditor.Row >= 1 then
  8.    begin
  9.       edCodeLabel.SetFocus;  // I have to move away the focus in order to following line work perfect
  10.       vlEditor.DeleteRow(vlEditor.Row);
  11.    end;
  12. end;
  13.  

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: TValueListEditor - Last Row now deleted if Focused
« Reply #1 on: August 30, 2018, 12:53:54 pm »
Please report in the bugtracker.
Attach a sample projet that demonstrates the issue (no non-standard components on the form please!).

Q: does a simple TStringGrid have the same problem?

Bart

egsuh

  • Hero Member
  • *****
  • Posts: 1296
Re: TValueListEditor - Last Row now deleted if Focused
« Reply #2 on: August 31, 2018, 07:38:58 am »
I reported to bugtracker.
For now, TStringGrid seems to work fine.

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: TValueListEditor - Last Row now deleted if Focused
« Reply #3 on: August 31, 2018, 06:57:14 pm »
I reported to bugtracker.
For now, TStringGrid seems to work fine.

Please next time post the issue in the correct project.
Now you posted it to "FPC", when (as you really should know) it belongs to "Lazarus".
I had to ask some fpc devel to move it now.

Bart

 

TinyPortal © 2005-2018