Hello again! I come with the following code (in ListView1.AfterLabelEdit event):
Please see the comments in the code. How can I get the text after the label edit? I'm stumped. Thanks!
Code:
second = ListView1.Items.Item(e.Item).Text 'it is staying at what the text was BEFORE the label edit, this I DO NOT WANT
Try
If second.Contains("/") Or second.Contains("\") Then 'see if it's a full file path or just a name
My.Computer.FileSystem.RenameFile(first, My.Computer.FileSystem.GetName(second))
Else
My.Computer.FileSystem.RenameFile(first, second)
End If
Catch ex As Exception
MsgBox(ex.Message)
e.CancelEdit = True
End Try