I have a tree with 4 levels. When the tree is created the first child node is set to EditText.
I have a tree with 4 levels. When the tree is created the first child node is set to EditText.
RootNode.getFirstChild.EditText;
After editing I want the next child node to go to EditText.
How can I make the app wait until the first child editing is finished before setting the next child to EditText?
...Dan'l
Found a way to do this.
ReplyDeleteIn ForrmKeUp:
if (key = VK_DOWN) and (ssCtrl in shift) then
begin
nd := GetMyNode;
if Assigned(nd) then
begin
nd := nd.GetNextChild(nd);
end;
if Assigned(nd) then
begin
nd.EditText
end;
end;
function TfrmGrocery.GetMyNode: TTreeNode;
begin
if tvPurchases.selected = nil then
begin
Result := tvPurchases.GetNodeAt(FX, FY);
tvPurchases.Selected := Result;
end
else
Result := tvPurchases.Selected;
end;
This puts the Qty node into EditText.