Reputation: 356
I am trying to edit treeview node names in a treeview (they become editable on a button click ) and then I want them to remain saved (if I exit and enter the aplication again, the new, edited names should be displayed), BUT they always revert to the original name(text) on program reentering.
private void button1_Click(object sender, EventArgs e)
{
treeView1.LabelEdit = true;
}
Questions is how to make the new treeview node names be saved after editing, so when I enter the aplication again they don't reset to the old ones.
Upvotes: 0
Views: 496
Reputation: 149
You can use the event on application shutdown to manually iterate over the TreeView and save the data to a file. Then when you applications starts again read them and populate the TreeView.
Upvotes: 1
Reputation: 3255
You cannot edit your project by modifying the developped program runtime.
Upvotes: 1