Vielleicht noch eine Funktion fürs UI:
Delphi-Quellcode:
procedure TInsightForm.TreeView1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ((Key = VK_UP) and
(not Assigned(TreeView1.Selected) or (TreeView1.Items.GetFirstNode = TreeView1.Selected))) then
Edit1.SetFocus;
end;
procedure TInsightForm.Edit1KeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_DOWN then
TreeView1.SetFocus;
end;