Recent

Author Topic: [SOLVED] VirtualStringTree update  (Read 1052 times)

Pe3s

  • Guest
[SOLVED] VirtualStringTree update
« on: July 10, 2022, 04:39:53 pm »
I started to learn the VST component, I have a problem with updating existing data. I would like to ask for help in coding the update.
I want to do so
1.Download data from VST component
2. Update the downloaded data
« Last Edit: July 10, 2022, 06:39:23 pm by Pe3s »

wp

  • Hero Member
  • *****
  • Posts: 13645
Re: VirtualStringTree update
« Reply #1 on: July 10, 2022, 04:56:04 pm »
Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button6Click(Sender: TObject);
  2. var
  3.   Data: PData;
  4. begin
  5.   if not Assigned(VST.FocusedNode) then Exit;
  6.   Data := VST.GetNodeData(VST.FocusedNode);
  7.   Data^.Imie := Edit1.Text;
  8.   Data^.Nazwisko := Edit2.Text;
  9.   VST.Invalidate;
  10. end;  

What do you mean with "Download data"?

Pe3s

  • Guest
Re: VirtualStringTree update
« Reply #2 on: July 10, 2022, 05:07:12 pm »
download data, when you click on the VST item and click on the download data button, it will download the data from VST to Edit


wp

  • Hero Member
  • *****
  • Posts: 13645
Re: VirtualStringTree update
« Reply #3 on: July 10, 2022, 05:22:16 pm »
download data, when you click on the VST item and click on the download data button, it will download the data from VST to Edit
Like this?
Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button5Click(Sender: TObject);
  2. var
  3.   Data: PData;
  4. begin
  5.   if not Assigned(VST.FocusedNode) then Exit;
  6.   Data := VST.GetNodeData(VST.FocusedNode);
  7.   Edit1.Text := Data^.Imie;
  8.   Edit2.Text := Data^.Nazwisko;
  9. end;

Pe3s

  • Guest
Re: VirtualStringTree update
« Reply #4 on: July 10, 2022, 06:38:58 pm »
Thank you @wp

 

TinyPortal © 2005-2018