Получить имя узла на treedirectory
I need to retrieve the node name according to the treeDirectory index when the Enter key is pressed Alternative: event name at node change
Что я уже пробовал:
private void treeDirectory_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { int idxNode = treeDirectory.SelectedNode.Index; //How read the text of node ? //on Mousedouble click is possible //string path = pathDirectory + e.Node.FullPath + "\\"; //Alternative: event name at node change //the variable add the text of current node //but when node change must be erase --> pathNode = "" pathNode += treeDirectory.SelectedNode.Text + "\\"; string path = pathDirectory + pathNode; //example //1 - select download pathNode = "<path>\\Download\\; //2 - select pictures //3 - select A = "<path>\\Download\\A\\;</pre //4 - change node and select Documents //I have to intercept the node change event ...... } }