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

I add database

id

parent_id

 

after then I again call procedure

 

FILLGOODS

treegoods.fullexpand --but not work (fullexpand)

 

and by function itemsearch I search itemnode if find and stay  but all my code not work

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...