Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

Help With ListView.BeforeLabelEdit and ListView.AfterLabelEdit

$
0
0
Hello again! I come with the following code (in ListView1.AfterLabelEdit event):
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

Please see the comments in the code. How can I get the text after the label edit? I'm stumped. Thanks!

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>