Jump to content

How stay or find new itemchild after add on Treeview?


Ulugbek

Recommended Posts

Hi Ulugbek.

 

Try

//how to stay after adding a node?...

procedure TMainForm.UniButton1Click(Sender: TObject);
var 
  AUniTreeNode: TUniTreeNode;
begin  
  AUniTreeNode := UniTreeView1.Items.AddChild(UniTreeView1.Selected, 'node1');
  UniTreeView1.Selected :=  AUniTreeNode;
  UniTreeView1.Selected.MakeVisible;
end;

sincerely

 

Link to comment
Share on other sites

Hi Ulugbek.

 

 

How do you build a tree? (you can give the procedure code FILLGOODS)

On what field you want to search (Text, ID, ..., better ID)?

 

Maybe after adding a node, and then save to the database, it is not necessary to re-build the tree (do not call the procedure FILLGOODS).

 

By the way, works for me FullExpand.

 

 

sincerely
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...