Lazarus

Programming => LCL => Topic started by: Pe3s on August 10, 2022, 07:08:45 pm

Title: [SOLVED] VST next and previous item selection
Post by: Pe3s on August 10, 2022, 07:08:45 pm
Hello forum members, I wanted to write this functionality for VirtualStringTree
1: previous button
2: next button

I would like to ask the more experienced VST forum members for advice?

Select the code first
Code: Pascal  [Select][+][-]
  1. var
  2.   Node: PVirtualNode;
  3. begin
  4.   Node := VST.GetFirst;
  5.   VST.FocusedNode := Node;
  6.   VST.Selected[Node] := True;
  7.   VST.SetFocus;
  8. end;
  9.  

Select the code last
Code: Pascal  [Select][+][-]
  1. var
  2.   Node: PVirtualNode;
  3. begin
  4.   Node := VST.GetLast;
  5.   VST.FocusedNode := Node;
  6.   VST.Selected[Node] := True;
  7.   VST.SetFocus;
  8. end;
  9.  
TinyPortal © 2005-2018