troubleshooting Question

Saving changes when i change the text on the display - VirtualStringTree

Avatar of Alpha_AI
Alpha_AI asked on
Delphi
5 Comments1 Solution242 ViewsLast Modified:
Hello, I can modify the text on the display but there seems to be a problem with the saving of the text.
Im not too sure where to put this

       Form1.MyVirtualStringTree1.SaveToFile(ExtractFilePath(Application.ExeName)+'\knowledgebank.dat');

//////////

Heres the code below for the NewText area.
 

procedure TForm1.MyVirtualStringTree1NewText(Sender: TBaseVirtualTree;
  Node: PVirtualNode; Column: TColumnIndex; NewText: WideString);
var
  Data: PNodeData;
begin
   Data:=Sender.GetNodeData(Node);
   if Assigned(Data) then
   begin
      case Column of
       0: Data^.DictionaryWord := NewText;
       1: Data^.Type1 := NewText;
       2: Data^.Meaning1 := NewText;
       3: Data^.Meaning2 := NewText;
       4: Data^.Meaning3 := NewText;
       5: Data^.Meaning4 := NewText;
       6: Data^.Meaning5 := NewText;
       7: Data^.Meaning6 := NewText;

      end;

   end;


end;

So yeah when i close the program and reopen it the saved changes are not there.
Thanks,

Ben
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros